From e06772a964e269d2d9abcb43a1edd868a62d4610 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Tue, 2 Jul 2024 21:58:34 +0300 Subject: enable irqs when we sleep or swap threads + Also swap checks if thread is running --- src/uapi/conf.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/uapi/conf.c') diff --git a/src/uapi/conf.c b/src/uapi/conf.c index 7925616..242239c 100644 --- a/src/uapi/conf.c +++ b/src/uapi/conf.c @@ -126,5 +126,7 @@ SYSCALL_DEFINE0(sleep)(struct tcb *t) if (!(has_cap(t->caps, CAP_POWER))) return_args1(t, ERR_PERM); + /* presumably we want to wake up on an interrupt */ + enable_irqs(); return_args1(t, sleep()); } -- cgit v1.3