Changeset ff3b3197 in mainline for generic/include/main/kconsole.h
- Timestamp:
- 2005-11-25T22:58:38Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f4338d2
- Parents:
- 78c32b4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/include/main/kconsole.h
r78c32b4 rff3b3197 30 30 #define __KCONSOLE_H__ 31 31 32 #include <typedefs.h> 33 #include <list.h> 34 #include <synch/spinlock.h> 35 36 enum cmd_arg_type { 37 ARG_TYPE_INVALID = 0, 38 ARG_TYPE_INT, 39 ARG_TYPE_STRING 40 }; 41 42 /** Structure representing one argument of kconsole command line. */ 43 struct cmd_arg { 44 cmd_arg_type_t type; /**< Type descriptor. */ 45 void *buffer; /**< Buffer where to store data. */ 46 size_t buflen; /**< Size of the buffer. */ 47 }; 48 49 /** Structure representing one kconsole command. */ 50 struct cmd_info { 51 link_t link; /**< Command list link. */ 52 spinlock_t lock; /**< This lock protects everything below. */ 53 const char *name; /**< Command name. */ 54 const char *description; /**< Textual description. */ 55 int (* func)(cmd_arg_t *cmd); /**< Function implementing the command. */ 56 count_t argc; /**< Number of arguments. */ 57 cmd_arg_t *argv; /**< Argument vector. */ 58 }; 59 60 extern spinlock_t cmd_lock; 61 extern link_t cmd_head; 62 63 extern void kconsole_init(void); 32 64 extern void kconsole(void *arg); 33 65 66 extern int cmd_register(cmd_info_t *cmd); 67 34 68 #endif
Note:
See TracChangeset
for help on using the changeset viewer.