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/head.S | |
| 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/head.S')
| -rw-r--r-- | kernel/head.S | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/head.S b/kernel/head.S index 31f423e..9a12833 100644 --- a/kernel/head.S +++ b/kernel/head.S @@ -94,9 +94,9 @@ _start_kernel: li t6, 0 csrw sscratch, 0 - // Point tp and sp to the init task. This is not crucial because in the end - // we are not doing anything with the 'tp' register, and our processes - // actually don't do anything on the stack. + // Point tp and sp to the init task. The 'tp' register will always point to + // the current process being executed, and it will be shown on debug when + // printing out messages. la tp, tasks la sp, tasks + THREAD_SIZE |
