Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Mar 2014 14:16:33 +0100
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        hackers@FreeBSD.org
Cc:        desrt@desrt.ca
Subject:   [CFR] Kevent timer improvements
Message-ID:  <20140310131632.GI6900@ithaqua.etoilebsd.net>

next in thread | raw e-mail | index | archive | help

--uJWb33pM2TcUAXIl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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

--uJWb33pM2TcUAXIl
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEUEARECAAYFAlMduzAACgkQ8kTtMUmk6EyAxACXdvQo8c5rOzznirJL+qGuu7In
vACgmnQ/db4THqo/GFtzDHGThnR6gUE=
=cBNm
-----END PGP SIGNATURE-----

--uJWb33pM2TcUAXIl--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140310131632.GI6900>