diff options
author | root <root> | 2008-10-01 04:25:25 +0000 |
---|---|---|
committer | root <root> | 2008-10-01 04:25:25 +0000 |
commit | 03ba7182d3e525203cd8535ce154a94242a6f511 (patch) | |
tree | c2da22108976f524657e0885a88a19bc034a6617 /ev.c | |
parent | c53135daec2ac56c937fc5d516031ecbaebdb956 (diff) |
*** empty log message ***
Diffstat (limited to 'ev.c')
-rw-r--r-- | ev.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 |