summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
authorroot <root>2008-10-01 04:25:25 +0000
committerroot <root>2008-10-01 04:25:25 +0000
commit03ba7182d3e525203cd8535ce154a94242a6f511 (patch)
treec2da22108976f524657e0885a88a19bc034a6617 /ev.c
parentc53135daec2ac56c937fc5d516031ecbaebdb956 (diff)
*** empty log message ***
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ev.c b/ev.c
index b20112e..4e86506 100644
--- a/ev.c
+++ b/ev.c
@@ -3014,13 +3014,17 @@ once_cb (EV_P_ struct ev_once *once, int revents)
static void
once_cb_io (EV_P_ ev_io *w, int revents)
{
- once_cb (EV_A_ (struct ev_once *)(((char *)w) - offsetof (struct ev_once, io)), revents);
+ struct ev_once *once = (struct ev_once *)(((char *)w) - offsetof (struct ev_once, io));
+
+ once_cb (EV_A_ once, revents | ev_clear_pending (EV_A_ &once->to));
}
static void
once_cb_to (EV_P_ ev_timer *w, int revents)
{
- once_cb (EV_A_ (struct ev_once *)(((char *)w) - offsetof (struct ev_once, to)), revents);
+ struct ev_once *once = (struct ev_once *)(((char *)w) - offsetof (struct ev_once, to));
+
+ once_cb (EV_A_ once, revents | ev_clear_pending (EV_A_ &once->io));
}
void