diff options
author | Ian Moffett <ian@osmora.org> | 2024-04-10 16:37:18 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-04-10 16:37:18 -0400 |
commit | e555b3c5901dc495e683529b663eab8ff0f36482 (patch) | |
tree | e8b032ce19b78c5c82206994bdc69770db2c0ffc /sys/kern | |
parent | 2e6049f48283042e95f06668d75cbdb8380581c3 (diff) |
kernel: sched: Lock thread upon sched_exit()
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_sched.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c index 4eb0cf3..afaf6a8 100644 --- a/sys/kern/kern_sched.c +++ b/sys/kern/kern_sched.c @@ -318,8 +318,8 @@ sched_exit(void) struct vas kvas = vm_get_kvas(); intr_mask(); - td = this_td(); + spinlock_acquire(&td->lock); /* Never release */ /* Switch back to the kernel address space and destroy ourself */ pmap_switch_vas(vm_get_ctx(), kvas); |