process: update comments on reviewed FIXME
authorAlan Cox <alan@linux.intel.com>
Tue, 19 May 2015 21:20:42 +0000 (22:20 +0100)
committerAlan Cox <alan@linux.intel.com>
Tue, 19 May 2015 21:20:42 +0000 (22:20 +0100)
Kernel/process.c

index 3600afe..1474962 100644 (file)
@@ -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. */