If a timer is updated (re-added) with a different time period
(specified in the .data field of the kevent), the new time period has
no effect; the timer will not expire until the original time has
elapsed. This seems to violate the documented behavior as the
kqueue(2) man page says (in part) "Re-adding an existing event will
modify the parameters of the original event, and not result in a
duplicate entry." This modification, adapted from a patch submitted by
@cem to bug 214987, fixes the kqueue system to allow updating a timer
entry.
In his comments about the patch @cem noted that it "is probably
racy". I believe that I have now addressed the locking aspects
of this change.
PR: 214987