summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
authorroot <root>2009-06-29 04:41:34 +0000
committerroot <root>2009-06-29 04:41:34 +0000
commit7b501a47474faec5ab49aff388f79a17dbdc6e04 (patch)
tree37753bd6f5d3379e233f33b48890fef8054060a1 /ev.c
parent68aeda203bfd3a3e4a5577dc0ada8155a7a12223 (diff)
*** empty log message ***
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/ev.c b/ev.c
index 4ca68a4..03fd014 100644
--- a/ev.c
+++ b/ev.c
@@ -286,6 +286,20 @@ extern "C" {
# define EV_HEAP_CACHE_AT !EV_MINIMAL
#endif
+/* on linux, we can use a (slow) syscall to avoid a dependency on pthread, */
+/* which makes programs even slower. might work on other unices, too. */
+#if EV_USE_CLOCK_SYSCALL
+# include <syscall.h>
+# 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
+
/* this block fixes any misconfiguration where we know we run into trouble otherwise */
#ifndef CLOCK_MONOTONIC
@@ -324,20 +338,6 @@ extern "C" {
# include <winsock.h>
#endif
-/* on linux, we can use a (slow) syscall to avoid a dependency on pthread, */
-/* which makes programs even slower. might work on other unices, too. */
-#if EV_USE_CLOCK_SYSCALL
-# include <syscall.h>
-# 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
/* our minimum requirement is glibc 2.7 which has the stub, but not the header */
# include <stdint.h>