summaryrefslogtreecommitdiff
path: root/kern/thread.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-03-16 23:38:02 +0100
committerRichard Braun <rbraun@sceen.net>2017-03-16 23:38:02 +0100
commit3c79e188ddb78ffbca658ecbbba52f4c6d334820 (patch)
tree617208b5e8b27fade1796ca1f5ab150c7ba02b81 /kern/thread.c
parenteabb576625cf6a130443809d5d80cec7517dff1a (diff)
kern/thread: improve description of thread locking
Diffstat (limited to 'kern/thread.c')
-rw-r--r--kern/thread.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/kern/thread.c b/kern/thread.c
index 416be5eb..f4ed2f5c 100644
--- a/kern/thread.c
+++ b/kern/thread.c
@@ -2322,16 +2322,6 @@ thread_wakeup(struct thread *thread)
thread_clear_wchan(thread);
thread->state = THREAD_RUNNING;
} else {
- /*
- * If another wake-up was attempted right before this one, the thread
- * may currently be pushed on a remote run queue, and the run queue
- * being locked here is actually the previous one. The run queue
- * pointer may be modified concurrently, now being protected by the
- * target run queue. This isn't a problem since the thread state has
- * already been updated, making this attempt stop early. In addition,
- * locking semantics guarantee that, if the thread as seen by this
- * attempt isn't running, its run queue is up to date.
- */
runq = thread_lock_runq(thread, &flags);
if (thread->state == THREAD_RUNNING) {