summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 8f99b19..0be3af3 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -713,9 +713,9 @@ create_init(const void *udata __unused)
PROC_UNLOCK(initproc);
crfree(oldcred);
cred_update_thread(FIRST_THREAD_IN_PROC(initproc));
- mtx_lock_spin(&sched_lock);
+ PROC_SLOCK(initproc);
initproc->p_sflag |= PS_INMEM;
- mtx_unlock_spin(&sched_lock);
+ PROC_SUNLOCK(initproc);
cpu_set_fork_handler(FIRST_THREAD_IN_PROC(initproc), start_init, NULL);
}
SYSINIT(init, SI_SUB_CREATE_INIT, SI_ORDER_FIRST, create_init, NULL)
@@ -729,9 +729,9 @@ kick_init(const void *udata __unused)
struct thread *td;
td = FIRST_THREAD_IN_PROC(initproc);
- mtx_lock_spin(&sched_lock);
+ thread_lock(td);
TD_SET_CAN_RUN(td);
sched_add(td, SRQ_BORING);
- mtx_unlock_spin(&sched_lock);
+ thread_unlock(td);
}
SYSINIT(kickinit, SI_SUB_KTHREAD_INIT, SI_ORDER_FIRST, kick_init, NULL)
OpenPOWER on IntegriCloud