CVSROOT:        /cvs
Module name:    src
Changes by:     m...@cvs.openbsd.org    2017/11/04 08:13:53

Modified files:
        sys/kern       : kern_event.c uipc_socket.c 
        sys/miscfs/fifofs: fifo_vnops.c 
        sys/sys        : event.h socketvar.h 

Log message:
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@

Reply via email to