From fc8302d8243ead1ff658095bd85c407d0a9ea22d Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 19 May 2015 22:20:42 +0100 Subject: [PATCH] process: update comments on reviewed FIXME --- Kernel/process.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Kernel/process.c b/Kernel/process.c index 3600afed..14749626 100644 --- a/Kernel/process.c +++ b/Kernel/process.c @@ -40,8 +40,11 @@ void psleep(void *event) udata.u_ptab->p_waitno = ++waitno; nready--; - /* FIXME: we don't want to restore interrupts here, but what - is the consequence */ + /* It is safe to restore interrupts here. We have already updated the + process state. The worst case is that a wakeup as we switchout + leads us to switch out and back in, or that we wake and run + after other candidates - no different to it occuring after the + switch */ irqrestore(irq); switchout(); /* Switch us out, and start another process */ /* Switchout doesn't return in this context until we have been switched back in, of course. */ -- 2.34.1