Changeset b3f8fb7 in mainline for kernel/generic/include/console
- Timestamp:
- 2007-01-28T13:25:49Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8e8c1a5
- Parents:
- 1ba41c5
- Location:
- kernel/generic/include/console
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/console/chardev.h
r1ba41c5 rb3f8fb7 36 36 #define KERN_CHARDEV_H_ 37 37 38 #include <typedefs.h>39 38 #include <arch/types.h> 40 39 #include <synch/waitq.h> … … 43 42 #define CHARDEV_BUFLEN 512 44 43 44 struct chardev; 45 45 46 /* Character device operations interface. */ 46 struct chardev_operations{47 void (* suspend)( chardev_t*); /**< Suspend pushing characters. */48 void (* resume)( chardev_t*); /**< Resume pushing characters. */49 void (* write)( chardev_t*, char c); /**< Write character to stream. */47 typedef struct { 48 void (* suspend)(struct chardev *); /**< Suspend pushing characters. */ 49 void (* resume)(struct chardev *); /**< Resume pushing characters. */ 50 void (* write)(struct chardev *, char c); /**< Write character to stream. */ 50 51 /** Read character directly from device, assume interrupts disabled */ 51 char (* read)(chardev_t *); 52 }; 53 54 typedef struct chardev_operations chardev_operations_t; 52 char (* read)(struct chardev *); 53 } chardev_operations_t; 55 54 56 55 /** Character input device. */ 57 struct chardev {56 typedef struct chardev { 58 57 char *name; 59 58 … … 65 64 index_t index; 66 65 void *data; 67 } ;66 } chardev_t; 68 67 69 68 extern void chardev_initialize(char *name, -
kernel/generic/include/console/cmd.h
r1ba41c5 rb3f8fb7 36 36 #define KERN_CMD_H_ 37 37 38 #include < typedefs.h>38 #include <console/kconsole.h> 39 39 40 40 extern void cmd_initialize(cmd_info_t *cmd); -
kernel/generic/include/console/console.h
r1ba41c5 rb3f8fb7 37 37 38 38 #include <arch/types.h> 39 #include < typedefs.h>39 #include <console/chardev.h> 40 40 41 41 extern chardev_t *stdin; -
kernel/generic/include/console/kconsole.h
r1ba41c5 rb3f8fb7 36 36 #define KERN_KCONSOLE_H_ 37 37 38 #include <typedefs.h>39 38 #include <adt/list.h> 40 39 #include <synch/spinlock.h> … … 43 42 #define KCONSOLE_HISTORY 10 44 43 45 enum cmd_arg_type{44 typedef enum { 46 45 ARG_TYPE_INVALID = 0, 47 46 ARG_TYPE_INT, 48 47 ARG_TYPE_STRING, 49 48 ARG_TYPE_VAR /**< Variable type - either symbol or string */ 50 } ;49 } cmd_arg_type_t; 51 50 52 51 /** Structure representing one argument of kconsole command line. */ 53 struct cmd_arg{52 typedef struct { 54 53 cmd_arg_type_t type; /**< Type descriptor. */ 55 54 void *buffer; /**< Buffer where to store data. */ … … 57 56 unative_t intval; /**< Integer value */ 58 57 cmd_arg_type_t vartype; /**< Resulting type of variable arg */ 59 } ;58 } cmd_arg_t; 60 59 61 60 /** Structure representing one kconsole command. */ 62 struct cmd_info{61 typedef struct { 63 62 link_t link; /**< Command list link. */ 64 63 SPINLOCK_DECLARE(lock); /**< This lock protects everything below. */ … … 69 68 cmd_arg_t *argv; /**< Argument vector. */ 70 69 void (* help)(void); /**< Function for printing detailed help. */ 71 } ;70 } cmd_info_t; 72 71 73 72 extern spinlock_t cmd_lock;
Note:
See TracChangeset
for help on using the changeset viewer.
