summaryrefslogtreecommitdiffstats
path: root/contrib/libev
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-29 13:06:23 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-29 13:06:23 +0100
commitb3713de7cefa87af9ed95d091db497cef63502d0 (patch)
treed689606317be5f22ede887fc7ae418247a3bef60 /contrib/libev
parent30c0dca001842d9dc009be0ff9ade49b69963bd2 (diff)
downloadrspamd-b3713de7cefa87af9ed95d091db497cef63502d0.tar.gz
rspamd-b3713de7cefa87af9ed95d091db497cef63502d0.zip
[Fix] Fix pending checks for events
Diffstat (limited to 'contrib/libev')
-rw-r--r--contrib/libev/ev.h2
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)