summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_kthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_kthread.c')
-rw-r--r--sys/kern/kern_kthread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c
index c473bb0..03f7f47 100644
--- a/sys/kern/kern_kthread.c
+++ b/sys/kern/kern_kthread.c
@@ -113,9 +113,9 @@ kthread_create(void (*func)(void *), void *arg,
/* Delay putting it on the run queue until now. */
if (!(flags & RFSTOPPED)) {
- mtx_lock_spin(&sched_lock);
+ thread_lock(td);
sched_add(td, SRQ_BORING);
- mtx_unlock_spin(&sched_lock);
+ thread_unlock(td);
}
return 0;
OpenPOWER on IntegriCloud