CVSROOT: /cvs Module name: src Changes by: clau...@cvs.openbsd.org 2023/09/04 07:18:41
Modified files: sys/kern : kern_exit.c kern_fork.c kern_sig.c sys/sys : proc.h Log message: Protect ps_single, ps_singlecnt and ps_threadcnt by the process mutex. The single thread API needs to lock the process to enter single thread mode and does not need to stop the scheduler. This code changes ps_singlecount from a count down to zero to ps_singlecnt which counts up until equal to ps_threadcnt (in which case all threads are properly asleep). Tested by phessler@, OK mpi@ cheloha@