uloop: improve edge trigger reliability on mac os x
[project/libubox.git] / uloop.h
diff --git a/uloop.h b/uloop.h
index bce3974..b5cd0d4 100644 (file)
--- a/uloop.h
+++ b/uloop.h
@@ -21,6 +21,7 @@
 #define _ULOOP_H__
 
 #include <sys/time.h>
+#include <sys/types.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <signal.h>
@@ -45,6 +46,9 @@ typedef void (*uloop_process_handler)(struct uloop_process *c, int ret);
 #define ULOOP_WRITE            (1 << 1)
 #define ULOOP_EDGE_TRIGGER     (1 << 2)
 #define ULOOP_BLOCKING         (1 << 3)
+#ifdef USE_KQUEUE
+#define ULOOP_EDGE_DEFER       (1 << 4)
+#endif
 
 struct uloop_fd
 {
@@ -54,7 +58,7 @@ struct uloop_fd
        bool error;
        bool registered;
 #ifdef USE_KQUEUE
-       uint8_t kqflags;
+       bool flags;
 #endif
 };