diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2024-12-02 20:47:19 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2024-12-02 20:47:19 +0100 |
| commit | 32e880127366fabc3e8b4fecb642f1cc06b8fd71 (patch) | |
| tree | df11bd7d7895ac0dde245383b4a10a51f83fc659 /kernel/main.c | |
| parent | a7287a7891d9ead98221c3de79d46d487e0d68ac (diff) | |
| download | fbos-32e880127366fabc3e8b4fecb642f1cc06b8fd71.tar.gz fbos-32e880127366fabc3e8b4fecb642f1cc06b8fd71.zip | |
Prepend the name of the task on debug
On 'printk' and 'sys_write' calls, prepend the name of the task that is
being executed for each message. This is an easy way to show off that we
are doing the right thing with the 'tp' register, even if we don't do
much with it.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'kernel/main.c')
| -rw-r--r-- | kernel/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/main.c b/kernel/main.c index ecb93da..9c524c4 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -10,10 +10,10 @@ unsigned long stack[4][THREAD_SIZE / sizeof(unsigned long)]; // Initialize the list of structs by providing a fixed stack address and empty // values everywhere else. struct task_struct tasks[4] = { - [TASK_INIT] = { .stack = stack[0], .entry_addr = nullptr, }, - [TASK_FIZZ] = { .stack = stack[1], .entry_addr = nullptr, }, - [TASK_BUZZ] = { .stack = stack[2], .entry_addr = nullptr, }, - [TASK_FIZZBUZZ] = { .stack = stack[3], .entry_addr = nullptr, }, + [TASK_INIT] = { .stack = stack[0], .name = "init", .entry_addr = nullptr, }, + [TASK_FIZZ] = { .stack = stack[1], .name = "fizz", .entry_addr = nullptr, }, + [TASK_BUZZ] = { .stack = stack[2], .name = "buzz", .entry_addr = nullptr, }, + [TASK_FIZZBUZZ] = { .stack = stack[3], .name = "fizzbuzz", .entry_addr = nullptr, }, }; // Defined in fbos/init.h. |
