Felix Fietkau
b9ebdbcc64
uloop: fix corner cases with recursive uloop_run calls
...
With multiple recursive calls to uloop_run, the callback for the same fd
can be run multiple times from different levels in the stack.
Prevent this by tracking the stack of uloop_fd callbacks and buffering new
incoming events for fds already on the stack.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-06-18 12:05:09 +02:00
Felix Fietkau
e386259632
libubox: make uloop_fd::flags generic
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-06-18 12:05:09 +02:00
Felix Fietkau
cd5238b500
uloop: fix edge trigger handling on mac os x
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-06-18 11:02:20 +02:00
Jo-Philipp Wich
8b0d933154
uloop: rename uloop_timeout_pending() to uloop_timeout_remaining()
2013-01-23 19:33:12 +01:00
Jo-Philipp Wich
77984bd24d
uloop: add uloop_timeout_pending() function to determine the remaining time of an active timeout
2013-01-23 19:32:45 +01:00
Felix Fietkau
569bc29c5a
uloop: replace copyright info (code has been completely rewritten over time), relicense to ISC
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-13 09:47:51 +01:00
Felix Fietkau
17f4e41ecb
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>
2013-01-04 03:18:42 +01:00
Felix Fietkau
6a8df07590
uloop: do less state/change tracking for kevent() on mac os x, it is unreliable
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-04 01:15:48 +01:00
Benjamin Larsson
652162cf86
uloop: include sys/types.h to make pid_t available
2012-05-28 15:17:46 +02:00
Felix Fietkau
a8032be64c
uloop: use list.h, add support for handling sigchld
2011-05-24 22:12:17 +02:00
Felix Fietkau
db19e64c1a
make uloop_end() inline
2011-02-07 17:51:20 +01:00
Felix Fietkau
bf87f247d8
uloop: export the cancelled flag
2011-02-06 16:13:58 +01:00
Felix Fietkau
cd086c7c15
uloop: add a flag for keeping the socket blocking
2010-12-06 16:54:13 +01:00
Felix Fietkau
0d1a602dcf
port uloop to BSD kqueue
2010-12-05 00:38:58 +01:00
Felix Fietkau
e82d74f898
Initial import
2010-10-13 21:29:08 +02:00