[CFR] Kevent timer improvements
Baptiste Daroussin
bapt at FreeBSD.org
Mon Mar 10 13:16:38 UTC 2014
Hi all,
A glib developer pointed me to some of the improvements Apple has done on
kqueue(2), some of those improvements are used or will be used by glib in the
near futur, plus add new one.
I decided to implement part of it and here is the first patch about it:
http://people.freebsd.org/~bapt/kevent.diff
I will update the manpages accordingly as well:
Basically this patch added the following to the EVFILT_TIMER:
NOTE_SECONDS data is in seconds
NOTE_USECONDS data is in microseconds
NOTE_NSECONDS data is in nanoseconds
It also added a NOTE_MONOTONIC which consider the data as an absolute time since
the boot. (It is different from NOTE_ABSOLUTE extension from apple, so I decided
to use NOTE_MONOTONIC to avoid collision).
Note that NOTE_MONOTONIC is right only valid as EV_ONESHOT as the is the
behaviour that make sense to me concerning this kind of event, should it be
different? in that case what behaviour would be expected here?
I do plan to add kevent64 support compatible with apple implementation later, as
using NOTE_MONOTONIC without 64bit support is not useful very long :)
Please keep Ryan in CC I don't think he is subcribed to that least and he is the
one from glib project asking for those improvements.
regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20140310/c7bd357c/attachment.sig>
More information about the freebsd-hackers
mailing list