Add edgetrigger and oneshot event types

This commit is contained in:
martijn81 committed 2017-05-06 13:53:38 +02:00
1 parent 2c675519a3
commit 047cc44c83
4 files changed
+29 -1

No files matched your search

+6
View File
@@ -60,6 +60,12 @@ int uev_io_init(uev_ctx_t *ctx, uev_t *w, uev_cb_t *cb, void *arg, int fd, int e
*/
int uev_io_set(uev_t *w, int fd, int events)
{
if( events & UEV_ONESHOT
&& 1 == w->active ) {
return uev_watcher_rearm(w);
}
/* Ignore any errors, only to clean up anything lingering ... */
uev_io_stop(w);