diff options
Diffstat (limited to 'contrib/libev')
-rw-r--r-- | contrib/libev/ev.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/libev/ev.h b/contrib/libev/ev.h index b27a2fdad..4b7503d3d 100644 --- a/contrib/libev/ev.h +++ b/contrib/libev/ev.h @@ -705,6 +705,8 @@ EV_API_DECL void ev_resume (EV_P) EV_NOEXCEPT; #define ev_is_pending(ev) (0 + ((ev_watcher *)(void *)(ev))->pending) /* ro, true when watcher is waiting for callback invocation */ #define ev_is_active(ev) (0 + ((ev_watcher *)(void *)(ev))->active) /* ro, true when the watcher has been started */ +#define ev_can_stop(ev) (ev_is_pending(ev) || ev_is_active(ev)) /* ro, true when the watcher has been started */ + #define ev_cb_(ev) (ev)->cb /* rw */ #define ev_cb(ev) (memmove (&ev_cb_ (ev), &((ev_watcher *)(ev))->cb, sizeof (ev_cb_ (ev))), (ev)->cb) |