From f560a5312f524caaa427f4f548b97ab3f32904b8 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Sat, 30 Nov 2024 22:28:51 +0100 Subject: Rename 'switch_to' to 'set_return_address_to' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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à --- include/fbos/sched.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'include') 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" -- cgit v1.2.3