diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2024-11-30 22:28:51 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2024-11-30 22:28:51 +0100 |
| commit | f560a5312f524caaa427f4f548b97ab3f32904b8 (patch) | |
| tree | 98a11c0c7c21a410bdfcaba20766567d4496527b /include | |
| parent | 891742e62d79aeaf7dfd052df87777c2e4826357 (diff) | |
| download | fbos-f560a5312f524caaa427f4f548b97ab3f32904b8.tar.gz fbos-f560a5312f524caaa427f4f548b97ab3f32904b8.zip | |
Rename 'switch_to' to 'set_return_address_to'
The original name came from a previous hack the did not work but somehow
the old name remained. Now it was more misleading than anything else, so
let's rename it to something that is closer to what it actually does.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/fbos/sched.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/fbos/sched.h b/include/fbos/sched.h index 00f3e70..f43b6e5 100644 --- a/include/fbos/sched.h +++ b/include/fbos/sched.h @@ -27,10 +27,8 @@ struct task_struct { // Tasks available on this kernel. extern struct task_struct tasks[4]; -// Switch execution to the given U-mode task. Note that this function will not -// do the actual returning, but it prepares the relevant registers for an -// eventual jump. -__kernel __always_inline void switch_to(int task_id) +// Set the return address to U-mode to the given task. +__kernel __always_inline void set_return_address_to(int task_id) { asm volatile("csrc sstatus, %0\n\t" "mv t0, %1\n\t" |
