From 68aeda203bfd3a3e4a5577dc0ada8155a7a12223 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 29 Jun 2009 04:41:34 +0000 Subject: *** empty log message *** --- ev.c | 13 ++++++++++--- ev.pod | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ev.c b/ev.c index 2b1f8f4..4ca68a4 100644 --- a/ev.c +++ b/ev.c @@ -59,6 +59,8 @@ extern "C" { # define EV_USE_MONOTONIC 1 # endif # endif +# elif !defined(EV_USE_CLOCK_SYSCALL) +# define EV_USE_CLOCK_SYSCALL 0 # endif # if HAVE_CLOCK_GETTIME @@ -326,9 +328,14 @@ extern "C" { /* which makes programs even slower. might work on other unices, too. */ #if EV_USE_CLOCK_SYSCALL # include -# define clock_gettime(id, ts) syscall (SYS_clock_gettime, (id), (ts)) -# undef EV_USE_MONOTONIC -# define EV_USE_MONOTONIC 1 +# ifdef SYS_clock_gettime +# define clock_gettime(id, ts) syscall (SYS_clock_gettime, (id), (ts)) +# undef EV_USE_MONOTONIC +# define EV_USE_MONOTONIC 1 +# else +# undef EV_USE_CLOCK_SYSCALL +# define EV_USE_CLOCK_SYSCALL 0 +# endif #endif #if EV_USE_EVENTFD diff --git a/ev.pod b/ev.pod index 26be56c..d2de446 100644 --- a/ev.pod +++ b/ev.pod @@ -2004,8 +2004,8 @@ exits). It is permissible to install a child watcher I the child has been forked (which implies it might have already exited), as long as the event loop isn't entered (or is continued from a watcher), i.e., forking and then immediately registering a watcher for the child is fine, -but forking and registering a watcher a few event loop iterations later is -not. +but forking and registering a watcher a few event loop iterations later or +in the next callback invocation is not. Only the default event loop is capable of handling signals, and therefore you can only register child watchers in the default event loop. -- cgit v1.2.3