CVSROOT: /cvs Module name: src Changes by: clau...@cvs.openbsd.org 2024/08/06 02:44:54
Modified files: sys/kern : kern_event.c kern_exec.c kern_exit.c kern_fork.c kern_sig.c sys/sys : event.h proc.h Log message: Stop using KERNEL_LOCK to protect the per process kqueue list Instead of the KERNEL_LOCK use the ps_mtx for most operations. If the ps_klist is modified an additional global rwlock (kqueue_ps_list_lock) is required. This includes the knotes with NOTE_FORK and NOTE_EXIT since in either cases a ps_klist is changed. In the NOTE_FORK | NOTE_TRACK case the call to kqueue_register() can sleep this is why a global rwlock is used. Adjust the reaper() to call knote_processexit() without KERNEL_LOCK. Double lock idea from visa@ OK mvs@