From: Ben Pfaff Date: Fri, 21 Jul 2006 02:05:37 +0000 (+0000) Subject: Improve comment on sema_down. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=commitdiff_plain;h=de76134e7b5d21ba0551657bbfc0dbb24e3c2312 Improve comment on sema_down. Thanks to Haobo Xu for pointing this out. --- diff --git a/src/threads/synch.c b/src/threads/synch.c index c2764bc..317c68a 100644 --- a/src/threads/synch.c +++ b/src/threads/synch.c @@ -55,8 +55,8 @@ sema_init (struct semaphore *sema, unsigned value) This function may sleep, so it must not be called within an interrupt handler. This function may be called with - interrupts disabled, but interrupts will be turned back on if - we need to sleep. */ + interrupts disabled, but if it sleeps then the next scheduled + thread will probably turn interrupts back on. */ void sema_down (struct semaphore *sema) {