Enhance command execution with improved concurrency and documentation updates. Refined the CommandTaskContext structure for better task management and clarified usage instructions for 'memtest' and 'tasktest' commands in README.md.

This commit is contained in:
2026-02-27 20:14:24 +00:00
parent 7ecf26cbd9
commit 9b1a70e3a5
4 changed files with 199 additions and 61 deletions

View File

@@ -9,6 +9,7 @@
#define COMMANDS_H
#include "boot_info.h"
#include "task.h"
/* Handler function signature: receives BootInfo and any argument text. */
typedef void (*CommandHandlerFn)(BootInfo *Boot, CHAR16 *Args);
@@ -26,8 +27,13 @@ typedef struct {
CommandHandlerFn handler; /* function that executes the cmd */
} Command;
/* Parse and dispatch a line of user input. */
void execute_command(BootInfo *Boot, CHAR16 *Input);
/* Parse and dispatch a line of user input.
*
* Returns:
* - Pointer to a Task representing the spawned command process,
* or NULL if the command was not found or ran synchronously.
*/
Task *execute_command(BootInfo *Boot, CHAR16 *Input);
/* Print a formatted list of all registered commands. */
void show_help(BootInfo *Boot);