Rev 2787 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2787 | Rev 4377 | ||
---|---|---|---|
Line 35... | Line 35... | ||
35 | #ifndef KERN_KCONSOLE_H_ |
35 | #ifndef KERN_KCONSOLE_H_ |
36 | #define KERN_KCONSOLE_H_ |
36 | #define KERN_KCONSOLE_H_ |
37 | 37 | ||
38 | #include <adt/list.h> |
38 | #include <adt/list.h> |
39 | #include <synch/spinlock.h> |
39 | #include <synch/spinlock.h> |
- | 40 | #include <ipc/irq.h> |
|
40 | 41 | ||
41 | #define MAX_CMDLINE 256 |
42 | #define MAX_CMDLINE 256 |
42 | #define KCONSOLE_HISTORY 10 |
43 | #define KCONSOLE_HISTORY 10 |
43 | 44 | ||
44 | typedef enum { |
45 | typedef enum { |
45 | ARG_TYPE_INVALID = 0, |
46 | ARG_TYPE_INVALID = 0, |
46 | ARG_TYPE_INT, |
47 | ARG_TYPE_INT, |
47 | ARG_TYPE_STRING, |
48 | ARG_TYPE_STRING, |
48 | /** Variable type - either symbol or string. */ |
49 | /** Variable type - either symbol or string. */ |
49 | ARG_TYPE_VAR |
50 | ARG_TYPE_VAR |
50 | } cmd_arg_type_t; |
51 | } cmd_arg_type_t; |
51 | 52 | ||
52 | /** Structure representing one argument of kconsole command line. */ |
53 | /** Structure representing one argument of kconsole command line. */ |
53 | typedef struct { |
54 | typedef struct { |
54 | /** Type descriptor. */ |
55 | /** Type descriptor. */ |
Line 81... | Line 82... | ||
81 | cmd_arg_t *argv; |
82 | cmd_arg_t *argv; |
82 | /** Function for printing detailed help. */ |
83 | /** Function for printing detailed help. */ |
83 | void (* help)(void); |
84 | void (* help)(void); |
84 | } cmd_info_t; |
85 | } cmd_info_t; |
85 | 86 | ||
- | 87 | extern bool kconsole_notify; |
|
- | 88 | extern irq_t kconsole_irq; |
|
- | 89 | ||
86 | SPINLOCK_EXTERN(cmd_lock); |
90 | SPINLOCK_EXTERN(cmd_lock); |
87 | extern link_t cmd_head; |
91 | extern link_t cmd_head; |
88 | 92 | ||
89 | extern void kconsole_init(void); |
93 | extern void kconsole_init(void); |
- | 94 | extern void kconsole_notify_init(void); |
|
- | 95 | extern bool kconsole_check_poll(void); |
|
- | 96 | extern void kconsole(char *prompt, char *msg, bool kcon); |
|
90 | extern void kconsole(void *prompt); |
97 | extern void kconsole_thread(void *data); |
91 | 98 | ||
92 | extern int cmd_register(cmd_info_t *cmd); |
99 | extern bool cmd_register(cmd_info_t *cmd); |
93 | 100 | ||
94 | #endif |
101 | #endif |
95 | 102 | ||
96 | /** @} |
103 | /** @} |
97 | */ |
104 | */ |