From 2592b8802eee2cd380b4c8ed5056ad4bfa31172a Mon Sep 17 00:00:00 2001 From: bapt Date: Fri, 18 Jul 2014 14:27:04 +0000 Subject: Extend kqueue's EVFILT_TIMER by adding precision unit flags support Define the precision macros as bits sets to conform with XNU equivalent. Test fflags passed for EVFILT_TIMER and return EINVAL in case an invalid flag is passed. Phabric: https://phabric.freebsd.org/D421 Reviewed by: kib --- lib/libc/sys/kqueue.2 | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'lib/libc') diff --git a/lib/libc/sys/kqueue.2 b/lib/libc/sys/kqueue.2 index 6f637e1..f84bc05 100644 --- a/lib/libc/sys/kqueue.2 +++ b/lib/libc/sys/kqueue.2 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 7, 2014 +.Dd July 18, 2014 .Dt KQUEUE 2 .Os .Sh NAME @@ -454,7 +454,7 @@ Establishes an arbitrary timer identified by .Va ident . When adding a timer, .Va data -specifies the timeout period in milliseconds. +specifies the timeout period. The timer will be periodic unless EV_ONESHOT is specified. On return, .Va data @@ -465,8 +465,25 @@ There is a system wide limit on the number of timers which is controlled by the .Va kern.kq_calloutmax sysctl. +.Bl -tag -width XXNOTE_USECONDS +.It Dv NOTE_SECONDS +.Va data +is in seconds. +.It Dv NOTE_MSECONDS +.Va data +is in milliseconds. +.It Dv NOTE_USECONDS +.Va data +is in microseconds. +.It Dv NOTE_NSECONDS +.Va data +is in nanoseconds. +.It +.El .Pp -On return, +If +.Va fflags +is not set, the default is milliseconds. On return, .Va fflags contains the events which triggered the filter. .It Dv EVFILT_USER -- cgit v1.1