Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-04 06:17:51 +0400
committerFelix Fietkau <nbd@openwrt.org>2013-01-04 06:18:42 +0400
commit17f4e41ecb80f70c14493b4518e6eabec9faff7b (patch)
treeb202846552dd39b6b39de953929c75e3381de47a /uloop.h
parentc2916d7bcca129152fbbbbedcd9990706df8760a (diff)
uloop: improve edge trigger reliability on mac os x
Sometimes after re-arming a fd, an initial event for reads is not generated, even though there is data pending. Work around this by making the trigger level-triggered first, then switching to edge trigger after processing the first event. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'uloop.h')
-rw-r--r--uloop.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/uloop.h b/uloop.h
index 4be2913..b5cd0d4 100644
--- a/uloop.h
+++ b/uloop.h
@@ -46,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,6 +57,9 @@ struct uloop_fd
bool eof;
bool error;
bool registered;
+#ifdef USE_KQUEUE
+ bool flags;
+#endif
};
struct uloop_timeout