summaryrefslogtreecommitdiff
path: root/sys/kern/kern_sensors.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2017-11-04 14:13:54 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2017-11-04 14:13:54 +0000
commitb88384b256aade92f4b379501be34474b1901884 (patch)
tree4e49f0744e8823b105d074604f2d581ec8ad091a /sys/kern/kern_sensors.c
parent5a401c4f4036bde61dba9f8912182e407c95fe37 (diff)
Make it possible for multiple threads to enter kqueue_scan() in parallel.
This is a requirement to use a sleeping lock inside kqueue filters. It is now possible, but not recommended, to sleep inside ``f_event''. Threads iterating over the list of pending events are now recognizing and skipping other threads' markers. knote_acquire() and knote_release() must be used to "own" a knote to make sure no other thread is sleeping with a reference on it. Acquire and marker logic taken from DragonFly but the KERNEL_LOCK() is still serializing the execution of the kqueue code. This also enable the NET_LOCK() in socket filters. Tested by abieber@ & juanfra@, run by naddy@ in a bulk, ok visa@, bluhm@
Diffstat (limited to 'sys/kern/kern_sensors.c')
0 files changed, 0 insertions, 0 deletions