From ca74cc263f2e7cc94e0216c775a09a52a970d235 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 15 Mar 2024 18:40:43 -0400 Subject: kernel: sched: Use this_td() to get thread Signed-off-by: Ian Moffett --- sys/kern/kern_sched.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'sys') diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c index d775e5a..bd59e41 100644 --- a/sys/kern/kern_sched.c +++ b/sys/kern/kern_sched.c @@ -301,17 +301,12 @@ sched_destroy_td(struct proc *td) void sched_exit(void) { - struct sched_state *state; - struct cpu_info *ci; struct proc *td; struct vas kvas = vm_get_kvas(); intr_mask(); - /* Get the thread running on the current processor */ - ci = this_cpu(); - state = &ci->sched_state; - td = state->td; + td = this_td(); /* Switch back to the kernel address space and destroy ourself */ pmap_switch_vas(vm_get_ctx(), kvas); -- cgit v1.2.3