aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_sched.c')
-rw-r--r--sys/kern/kern_sched.c7
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);