diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-05-29 18:55:46 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-05-29 18:55:46 +0000 |
commit | 86f51e9b2a1caddcb644ee44ff7ea54c3cfcc534 (patch) | |
tree | 3681b8cfc4966fcba6cde81f37e19fad6e372cf4 /sys/kern/kern_fork.c | |
parent | 81950f8bd88c891c2556d0f8c08dc903b5f221a8 (diff) |
Convert SCHED_LOCK from a recursive kernel lock to a mutex.
Over the last weeks the last SCHED_LOCK recursion was removed so this
is now possible and will allow to split up the SCHED_LOCK in a upcoming
step.
Instead of implementing an MP and SP version of SCHED_LOCK this just
always uses the mutex implementation.
While this makes the local s argument unused (the spl is now tracked by
the mutex itself) it is still there to keep this diff minimal.
Tested by many.
OK jca@ mpi@
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r-- | sys/kern/kern_fork.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 1cfb84d092b..3ed90a60388 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_fork.c,v 1.258 2024/05/20 10:32:20 claudio Exp $ */ +/* $OpenBSD: kern_fork.c,v 1.259 2024/05/29 18:55:45 claudio Exp $ */ /* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */ /* @@ -688,12 +688,8 @@ proc_trampoline_mi(void) struct proc *p = curproc; SCHED_ASSERT_LOCKED(); - clear_resched(curcpu()); - -#if defined(MULTIPROCESSOR) - __mp_unlock(&sched_lock); -#endif + mtx_leave(&sched_lock); spl0(); SCHED_ASSERT_UNLOCKED(); |