EE445M RTOS
Taken at the University of Texas Spring 2015
|
Invoke system calls. More...
Data Structures | |
struct | system_command |
Macros | |
#define | SYSTEM_MAX_COMMAND_NAME_LENGTH 16 |
#define | SYSTEM_MAX_COMMANDS 16 |
Typedefs | |
typedef uint8_t | system_iterator |
typedef uint8_t | exit_status_t |
typedef struct system_command | system_command |
Functions | |
void | system_init () |
bool | system_register_command (const char *, int(*)()) |
bool | system_deregister_command (const char *) |
exit_status_t | system_exec (const char *, const char **) |
system_command * | _system_command_from_name (const char *command_name) |
Invoke system calls.
Every language offers a 'system' call – pass it a string and the system interprets it. This is that library for this RTOS.
#define SYSTEM_MAX_COMMAND_NAME_LENGTH 16 |
#define SYSTEM_MAX_COMMANDS 16 |
Maximum number of commands supported by the system.
Definition at line 17 of file system.h.
Referenced by _system_command_from_name(), system_init(), and system_register_command().
typedef uint8_t exit_status_t |
typedef struct system_command system_command |
typedef uint8_t system_iterator |
system_command* _system_command_from_name | ( | const char * | command_name | ) |
For internal use only. This function returns a pointer to the registered to the command name .
Definition at line 58 of file system.c.
References strcmp(), and SYSTEM_MAX_COMMANDS.
Referenced by system_deregister_command(), and system_exec().
bool system_deregister_command | ( | const char * | ) |
Remove a command from the index of executable system commands.
Definition at line 45 of file system.c.
References _system_command_from_name(), CDL_DELETE, CDL_PREPEND, and system_command::valid.
exit_status_t system_exec | ( | const char * | , |
const char ** | |||
) |
Execute a system command.
Definition at line 69 of file system.c.
References _system_command_from_name(), system_command::command, postpone_death, and system_command::valid.
Referenced by shell_execute_command().
void system_init | ( | ) |
Initialize internal data structures.
Definition at line 19 of file system.c.
References CDL_PREPEND, and SYSTEM_MAX_COMMANDS.
Referenced by main().
bool system_register_command | ( | const char * | , |
int(*)() | |||
) |
Register a command for later execution.
Definition at line 29 of file system.c.
References CDL_DELETE, CDL_PREPEND, system_command::command, memset(), system_command::name, SYSTEM_MAX_COMMANDS, unregistered_commands, ustrcpy(), and system_command::valid.
Referenced by main().