Refactor routines to stop/unstop processes and save the corresponding signal.
authormpi <mpi@openbsd.org>
Thu, 6 May 2021 09:33:22 +0000 (09:33 +0000)
committermpi <mpi@openbsd.org>
Thu, 6 May 2021 09:33:22 +0000 (09:33 +0000)
commitd461369ced58cf6e095f5d7b0d39c6563db4a472
tree17a963417115cf5af6d07d7436132772d7904654
parent75bd9f5f839a1eee340931e6d7e380cb1261be0d
Refactor routines to stop/unstop processes and save the corresponding signal.

- Move the "hack" involving P_SINTR to avoid grabbing the SCHED_LOCK()
recursively closer to where it is necessary, in proc_stop()

- Introduce proc_unstop(), the symmetric routine to proc_stop(), which
manipulates `ps_xsig' and use it whenever a SSTOPed thread needs to be
awaken.

- Manipulate `ps_xsig' only in proc_stop/unstop()

ok kettenis@
sys/kern/kern_sig.c
sys/kern/sched_bsd.c
sys/kern/sys_process.c
sys/sys/signalvar.h