… | |
… | |
124 | # else |
124 | # else |
125 | # undef EV_USE_LINUXAIO |
125 | # undef EV_USE_LINUXAIO |
126 | # define EV_USE_LINUXAIO 0 |
126 | # define EV_USE_LINUXAIO 0 |
127 | # endif |
127 | # endif |
128 | |
128 | |
|
|
129 | # if HAVE_LINUX_FS_H && HAVE_SYS_TIMERFD_H && HAVE_KERNEL_RWF_T |
|
|
130 | # ifndef EV_USE_IOURING |
|
|
131 | # define EV_USE_IOURING EV_FEATURE_BACKENDS |
|
|
132 | # endif |
|
|
133 | # else |
|
|
134 | # undef EV_USE_IOURING |
|
|
135 | # define EV_USE_IOURING 0 |
|
|
136 | # endif |
|
|
137 | |
129 | # if HAVE_KQUEUE && HAVE_SYS_EVENT_H |
138 | # if HAVE_KQUEUE && HAVE_SYS_EVENT_H |
130 | # ifndef EV_USE_KQUEUE |
139 | # ifndef EV_USE_KQUEUE |
131 | # define EV_USE_KQUEUE EV_FEATURE_BACKENDS |
140 | # define EV_USE_KQUEUE EV_FEATURE_BACKENDS |
132 | # endif |
141 | # endif |
133 | # else |
142 | # else |
… | |
… | |
168 | # endif |
177 | # endif |
169 | # else |
178 | # else |
170 | # undef EV_USE_EVENTFD |
179 | # undef EV_USE_EVENTFD |
171 | # define EV_USE_EVENTFD 0 |
180 | # define EV_USE_EVENTFD 0 |
172 | # endif |
181 | # endif |
173 | |
182 | |
174 | #endif |
183 | #endif |
175 | |
184 | |
176 | /* OS X, in its infinite idiocy, actually HARDCODES |
185 | /* OS X, in its infinite idiocy, actually HARDCODES |
177 | * a limit of 1024 into their select. Where people have brains, |
186 | * a limit of 1024 into their select. Where people have brains, |
178 | * OS X engineers apparently have a vacuum. Or maybe they were |
187 | * OS X engineers apparently have a vacuum. Or maybe they were |
… | |
… | |
333 | # define EV_USE_LINUXAIO 0 |
342 | # define EV_USE_LINUXAIO 0 |
334 | # endif |
343 | # endif |
335 | #endif |
344 | #endif |
336 | |
345 | |
337 | #ifndef EV_USE_IOURING |
346 | #ifndef EV_USE_IOURING |
338 | # if __linux |
347 | # if __linux /* later checks might disable again */ |
339 | # define EV_USE_IOURING 0 |
348 | # define EV_USE_IOURING 1 |
340 | # else |
349 | # else |
341 | # define EV_USE_IOURING 0 |
350 | # define EV_USE_IOURING 0 |
342 | # endif |
351 | # endif |
343 | #endif |
352 | #endif |
344 | |
353 | |
… | |
… | |
436 | #endif |
445 | #endif |
437 | |
446 | |
438 | #if !EV_STAT_ENABLE |
447 | #if !EV_STAT_ENABLE |
439 | # undef EV_USE_INOTIFY |
448 | # undef EV_USE_INOTIFY |
440 | # define EV_USE_INOTIFY 0 |
449 | # define EV_USE_INOTIFY 0 |
|
|
450 | #endif |
|
|
451 | |
|
|
452 | #if __linux && EV_USE_IOURING |
|
|
453 | # include <linux/version.h> |
|
|
454 | # if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0) |
|
|
455 | # undef EV_USE_IOURING |
|
|
456 | # define EV_USE_IOURING 0 |
|
|
457 | # endif |
441 | #endif |
458 | #endif |
442 | |
459 | |
443 | #if !EV_USE_NANOSLEEP |
460 | #if !EV_USE_NANOSLEEP |
444 | /* hp-ux has it in sys/time.h, which we unconditionally include above */ |
461 | /* hp-ux has it in sys/time.h, which we unconditionally include above */ |
445 | # if !defined _WIN32 && !defined __hpux |
462 | # if !defined _WIN32 && !defined __hpux |
… | |
… | |
2004 | clock_gettime (CLOCK_REALTIME, &ts); |
2021 | clock_gettime (CLOCK_REALTIME, &ts); |
2005 | return EV_TS_GET (ts); |
2022 | return EV_TS_GET (ts); |
2006 | } |
2023 | } |
2007 | #endif |
2024 | #endif |
2008 | |
2025 | |
|
|
2026 | { |
2009 | struct timeval tv; |
2027 | struct timeval tv; |
2010 | gettimeofday (&tv, 0); |
2028 | gettimeofday (&tv, 0); |
2011 | return EV_TV_GET (tv); |
2029 | return EV_TV_GET (tv); |
|
|
2030 | } |
2012 | } |
2031 | } |
2013 | #endif |
2032 | #endif |
2014 | |
2033 | |
2015 | inline_size ev_tstamp |
2034 | inline_size ev_tstamp |
2016 | get_clock (void) |
2035 | get_clock (void) |