diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-15 18:40:43 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-15 19:56:21 -0400 |
commit | ca74cc263f2e7cc94e0216c775a09a52a970d235 (patch) | |
tree | 1ca7168261dab58386fec9ca9be4e79c4015bddc /sys/kern/kern_sched.c | |
parent | 1e7a1c0d90f6eb339e3e68c7b91bb21e81e06d5c (diff) |
kernel: sched: Use this_td() to get thread
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern/kern_sched.c')
-rw-r--r-- | sys/kern/kern_sched.c | 7 |
1 files changed, 1 insertions, 6 deletions
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); |