New uev_*_active() API: check if watcher is active

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2016-11-23 23:18:33 +01:00
1 parent 604afc6cec
commit b6f92e2b15
3 files changed
+21 -5

No files matched your search

+9
View File
@@ -124,6 +124,15 @@ int uev_watcher_stop(uev_t *w)
return 0;
}
/* Private to libuEv, do not use directly! */
int uev_watcher_active(uev_t *w)
{
if (!w)
return 0;
return w->active;
}
/**
* Create an event loop context
* @param ctx Pointer to an uev_ctx_t context to be initialized