Move SCHED_LOCK after sleep_signal_check.
authorclaudio <claudio@openbsd.org>
Wed, 16 Aug 2023 07:55:52 +0000 (07:55 +0000)
committerclaudio <claudio@openbsd.org>
Wed, 16 Aug 2023 07:55:52 +0000 (07:55 +0000)
commit3a16673c2ffffc4349bcd56176c191a0d83d7a57
treeb3188c688c708459c8703c4f93b1de70e86ffbbb
parent92db83438c54a3da7528d3fa9a5b6ca529dff655
Move SCHED_LOCK after sleep_signal_check.

sleep_signal_check() is there to look for pending signals / single thread
requests which were posted before sleep_setup() finished. Once p_stat
is set to SSLEEP the wakeup and delivery of signals is taken care of
by ptsignal and single_thread_set().

Moving the SCHED_LOCK further down allows to cleanup cursig() and to
remove a SCHED_LOCK recursion in single_thread_check().

OK mpi@
sys/kern/kern_sig.c
sys/kern/kern_synch.c