/branches/dynload/kernel/generic/include/console/chardev.h |
---|
46,7 → 46,7 |
/* Input character device operations interface. */ |
typedef struct { |
/** Read character directly from device, assume interrupts disabled. */ |
char (* poll)(struct indev *); |
wchar_t (* poll)(struct indev *); |
} indev_operations_t; |
/** Character input device. */ |
56,7 → 56,7 |
/** Protects everything below. */ |
SPINLOCK_DECLARE(lock); |
uint8_t buffer[INDEV_BUFLEN]; |
wchar_t buffer[INDEV_BUFLEN]; |
count_t counter; |
/** Implementation of indev operations. */ |
71,7 → 71,7 |
/* Output character device operations interface. */ |
typedef struct { |
/** Write character to output. */ |
void (* write)(struct outdev *, wchar_t c, bool silent); |
void (* write)(struct outdev *, wchar_t, bool); |
} outdev_operations_t; |
/** Character input device. */ |
88,11 → 88,14 |
extern void indev_initialize(char *name, indev_t *indev, |
indev_operations_t *op); |
extern void indev_push_character(indev_t *indev, uint8_t ch); |
extern void indev_push_character(indev_t *indev, wchar_t ch); |
extern wchar_t indev_pop_character(indev_t *indev); |
extern void outdev_initialize(char *name, outdev_t *outdev, |
outdev_operations_t *op); |
extern bool check_poll(indev_t *indev); |
#endif /* KERN_CHARDEV_H_ */ |
/** @} |
/branches/dynload/kernel/generic/include/console/kconsole.h |
---|
39,8 → 39,8 |
#include <synch/spinlock.h> |
#include <ipc/irq.h> |
#define MAX_CMDLINE 256 |
#define KCONSOLE_HISTORY 10 |
#define MAX_CMDLINE 256 |
#define KCONSOLE_HISTORY 10 |
typedef enum { |
ARG_TYPE_INVALID = 0, |
47,7 → 47,7 |
ARG_TYPE_INT, |
ARG_TYPE_STRING, |
/** Variable type - either symbol or string. */ |
ARG_TYPE_VAR |
ARG_TYPE_VAR |
} cmd_arg_type_t; |
/** Structure representing one argument of kconsole command line. */ |
96,7 → 96,7 |
extern void kconsole(char *prompt, char *msg, bool kcon); |
extern void kconsole_thread(void *data); |
extern int cmd_register(cmd_info_t *cmd); |
extern bool cmd_register(cmd_info_t *cmd); |
#endif |
/branches/dynload/kernel/generic/include/console/console.h |
---|
40,19 → 40,17 |
extern indev_t *stdin; |
extern outdev_t *stdout; |
extern bool silent; |
extern indev_t *stdin_wire(void); |
extern void console_init(void); |
extern void klog_init(void); |
extern void klog_update(void); |
extern bool check_poll(indev_t *indev); |
extern uint8_t getc(indev_t *indev); |
extern uint8_t _getc(indev_t *indev); |
extern wchar_t getc(indev_t *indev); |
extern count_t gets(indev_t *indev, char *buf, size_t buflen); |
extern unative_t sys_klog(int fd, const void * buf, size_t count); |
extern unative_t sys_klog(int fd, const void *buf, size_t size); |
extern void grab_console(void); |
extern void release_console(void); |