From: Ben Pfaff Date: Mon, 2 Apr 2007 07:23:22 +0000 (+0000) Subject: Improve comment on thread_unblock(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47ed78ddbcd6133d49b8ba11e7bbfcc2cf9f6ea4;p=pintos-anon Improve comment on thread_unblock(). Suggested by Godmar Back. --- diff --git a/src/threads/thread.c b/src/threads/thread.c index f6768c0..92d1aa8 100644 --- a/src/threads/thread.c +++ b/src/threads/thread.c @@ -216,7 +216,12 @@ thread_block (void) /* Transitions a blocked thread T to the ready-to-run state. This is an error if T is not blocked. (Use thread_yield() to - make the running thread ready.) */ + make the running thread ready.) + + This function does not preempt the running thread. This can + be important: if the caller had disabled interrupts itself, + it may expect that it can atomically unblock a thread and + update other data. */ void thread_unblock (struct thread *t) {