diff options
Diffstat (limited to 'kern/thread.c')
-rw-r--r-- | kern/thread.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kern/thread.c b/kern/thread.c index 17ac10bd..25d81771 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -2452,6 +2452,10 @@ thread_wakeup(struct thread *thread) struct thread_runq *runq; unsigned long flags; + if ((thread == NULL) || (thread == thread_self())) { + return; + } + /* * There is at most one reference on threads that were never dispatched, * in which case there is no need to lock anything. |