mirror of
https://github.com/troglobit/libuev.git
synced 2026-10-25 11:34:32 +00:00
Add support for generic events using Linux eventfd
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
fd89af6ca1
commit
90048e5996
9 files changed
+206
-1
No files matched your search
@@ -257,6 +257,9 @@ int uev_exit(uev_ctx_t *ctx)
|
||||
case UEV_CRON_TYPE:
|
||||
uev_timer_stop(w);
|
||||
break;
|
||||
|
||||
case UEV_EVENT_TYPE:
|
||||
uev_event_stop(w);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -397,6 +400,11 @@ int uev_run(uev_ctx_t *ctx, int flags)
|
||||
if (!w->u.c.when)
|
||||
uev_timer_stop(w);
|
||||
break;
|
||||
|
||||
case UEV_EVENT_TYPE:
|
||||
if (read(w->fd, &exp, sizeof(exp)) != sizeof(exp))
|
||||
events = UEV_HUP;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user