CVSROOT:        /cvs
Module name:    src
Changes by:     v...@cvs.openbsd.org    2021/04/22 09:30:12

Modified files:
        lib/libc/sys   : kqueue.2 
        sys/kern       : kern_event.c 

Log message:
kqueue: Make timer re-addition reset existing timer

When an existing EVFILT_TIMER filter is re-added, cancel the existing
timer and any pending event, and restart the timer using the new timeout
period. This makes the new timeout period take effect immediately and
matches the behaviour of FreeBSD. Previously, the new setting was
applied only after the existing timer expired.

The timer rescheduling is done by using an f_modify callback. The
reading of timer events is moved from f_event to f_process. f_event of
timer_filtops becomes redundant. Unlike most other event sources, timers
activate knotes directly without using a klist and knote(9).

OK mpi@

Reply via email to