Commits


ev: fix registering timers from timers callbacks We can't add items to the heap while we've iterating it, so we can't directly insert new times from a timer' callback. Instead, add them to a ``reserve'' space after the end of the heap, and merge them back inside the heap after all events have been processed.


ev: fix invalid fd check


ev: define EV_* constants instead of reusing POLL{IN,OUT} Dissociate us a bit from poll(2) so that we may even run on top of something else, and also allows to provide specific values for signal (EV_SIGNAL) and timers (EV_TIMEOUT).


import ev.[ch] from syncparty and amused; locally tweaked to support an arbitrary number of timers.