summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
authorMarc Alexander Lehmann <libev@schmorp.de>2019-06-20 23:14:53 +0000
committerMarc Alexander Lehmann <libev@schmorp.de>2019-06-20 23:14:53 +0000
commit98421aae1054ea9bf21d3fce35831ac07d744106 (patch)
treef51ee49cfd2d63234e79531cb61d86b426a579b6 /ev.c
parent0ce071c1047d31087e2cee3cc182fe89eea97e07 (diff)
downloadlibev-98421aae1054ea9bf21d3fce35831ac07d744106.tar.gz
libev-98421aae1054ea9bf21d3fce35831ac07d744106.zip
*** empty log message ***
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/ev.c b/ev.c
index f415aa6..1079f40 100644
--- a/ev.c
+++ b/ev.c
@@ -117,6 +117,15 @@
# define EV_USE_EPOLL 0
# endif
+# if HAVE_LINUX_AIO_ABI_H
+# ifndef EV_USE_LINUXAIO
+# define EV_USE_LINUXAIO EV_FEATURE_BACKENDS
+# endif
+# else
+# undef EV_USE_LINUXAIO
+# define EV_USE_LINUXAIO 0
+# endif
+
# if HAVE_KQUEUE && HAVE_SYS_EVENT_H
# ifndef EV_USE_KQUEUE
# define EV_USE_KQUEUE EV_FEATURE_BACKENDS
@@ -429,6 +438,14 @@
# endif
#endif
+#if EV_USE_LINUXAIO
+# include <sys/syscall.h>
+# if !SYS_io_getevents
+# undef EV_USE_LINUXAIO
+# define EV_USE_LINUXAIO 0
+# endif
+#endif
+
#if EV_USE_INOTIFY
# include <sys/statfs.h>
# include <sys/inotify.h>
@@ -2787,6 +2804,9 @@ ev_recommended_backends (void) EV_NOEXCEPT
flags &= ~EVBACKEND_POLL; /* poll return value is unusable (http://forums.freebsd.org/archive/index.php/t-10270.html) */
#endif
+ /* TODO: linuxaio is very experimental */
+ flags &= ~EVBACKEND_LINUXAIO;
+
return flags;
}