CVSROOT:        /cvs
Module name:    src
Changes by:     m...@cvs.openbsd.org    2025/05/11 14:03:08

Modified files:
        sys/kern       : kern_event.c 

Log message:
Make EVFILT_TIMER mp-safe.

Introduce 'filt_timer' opaque structure to keep the timeout(9), the
`ft_reschedule' flag and protecting mutex(9). The timeout(9) handler
could reschedule itself, so `ft_reschedule' flag prevents this on
timeout canceling.

Note, this diff keeps the timeout handler under kernel lock. We don't
touch kernel lock while we perform timeout_add(9) or
timeout_del_barier(9) on non mp-safe timeouts, so kevent(2) will not
stuck in kernel lock, meanwhile the timeout firing will take kernel
lock in most cases even for mp-safe timeouts.

ok visa

Reply via email to