aboutsummaryrefslogtreecommitdiff
path: root/kernel/proc/sched.c
diff options
context:
space:
mode:
authorsotech117 <michael_foiani@brown.edu>2024-03-04 03:19:08 +0000
committersotech117 <michael_foiani@brown.edu>2024-03-04 03:19:08 +0000
commitebfa0119159055d086f07aa05c15434666963826 (patch)
tree4726f089578e0264a04183d0e4b8126c0df9a809 /kernel/proc/sched.c
parent7fcadc2e8c9d3cd0f05c55fe7856191628475fba (diff)
try to fix tests
Diffstat (limited to 'kernel/proc/sched.c')
-rw-r--r--kernel/proc/sched.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/proc/sched.c b/kernel/proc/sched.c
index 91264fa..b422ef1 100644
--- a/kernel/proc/sched.c
+++ b/kernel/proc/sched.c
@@ -166,13 +166,12 @@ long sched_cancellable_sleep_on(ktqueue_t *queue)
KASSERT(queue != NULL);
- curthr->kt_state = KT_SLEEP_CANCELLABLE;
-
if (curthr->kt_cancelled)
{
return -EINTR;
}
+ curthr->kt_state = KT_SLEEP_CANCELLABLE;
sched_switch(queue);
if (curthr->kt_cancelled)