ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.c
(Generate patch)

Comparing libev/ev.c (file contents):
Revision 1.261 by root, Mon Sep 29 03:31:14 2008 UTC vs.
Revision 1.262 by root, Wed Oct 1 04:25:25 2008 UTC

3012} 3012}
3013 3013
3014static void 3014static void
3015once_cb_io (EV_P_ ev_io *w, int revents) 3015once_cb_io (EV_P_ ev_io *w, int revents)
3016{ 3016{
3017 once_cb (EV_A_ (struct ev_once *)(((char *)w) - offsetof (struct ev_once, io)), revents); 3017 struct ev_once *once = (struct ev_once *)(((char *)w) - offsetof (struct ev_once, io));
3018
3019 once_cb (EV_A_ once, revents | ev_clear_pending (EV_A_ &once->to));
3018} 3020}
3019 3021
3020static void 3022static void
3021once_cb_to (EV_P_ ev_timer *w, int revents) 3023once_cb_to (EV_P_ ev_timer *w, int revents)
3022{ 3024{
3023 once_cb (EV_A_ (struct ev_once *)(((char *)w) - offsetof (struct ev_once, to)), revents); 3025 struct ev_once *once = (struct ev_once *)(((char *)w) - offsetof (struct ev_once, to));
3026
3027 once_cb (EV_A_ once, revents | ev_clear_pending (EV_A_ &once->io));
3024} 3028}
3025 3029
3026void 3030void
3027ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) 3031ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg)
3028{ 3032{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines