Browse Source

*** empty log message ***

master
Marc Alexander Lehmann 13 years ago
parent
commit
cc82ded9ed
  1. 2
      Changes
  2. 10
      ev.c
  3. 5
      ev.h

2
Changes

@ -1,5 +1,7 @@
Revision history for libev, a high-performance and full-featured event loop.
TODO: ev_time_freeze, ev_time_thaw
TODO: ev_walk
- correctly zero the idx values for arrays, so destroying and
reinitialising the default loop actually works (patch by
Malek Hadj-Ali).

10
ev.c

@ -768,7 +768,7 @@ fd_reify (EV_P)
anfd->reify = 0;
anfd->events = events;
if (o_events != events || o_reify & EV_IOFDSET)
if (o_events != events || o_reify & EV__IOFDSET)
backend_modify (EV_A_ fd, o_events, events);
}
}
@ -849,7 +849,7 @@ fd_rearm_all (EV_P)
{
anfds [fd].events = 0;
anfds [fd].emask = 0;
fd_change (EV_A_ fd, EV_IOFDSET | 1);
fd_change (EV_A_ fd, EV__IOFDSET | 1);
}
}
@ -2176,7 +2176,7 @@ ev_io_start (EV_P_ ev_io *w)
return;
assert (("libev: ev_io_start called with negative fd", fd >= 0));
assert (("libev: ev_io start called with illegal event mask", !(w->events & ~(EV_IOFDSET | EV_READ | EV_WRITE))));
assert (("libev: ev_io start called with illegal event mask", !(w->events & ~(EV__IOFDSET | EV_READ | EV_WRITE))));
EV_FREQUENT_CHECK;
@ -2184,8 +2184,8 @@ ev_io_start (EV_P_ ev_io *w)
array_needsize (ANFD, anfds, anfdmax, fd + 1, array_init_zero);
wlist_add (&anfds[fd].head, (WL)w);
fd_change (EV_A_ fd, w->events & EV_IOFDSET | 1);
w->events &= ~EV_IOFDSET;
fd_change (EV_A_ fd, w->events & EV__IOFDSET | 1);
w->events &= ~EV__IOFDSET;
EV_FREQUENT_CHECK;
}

5
ev.h

@ -133,7 +133,8 @@ struct ev_loop;
#define EV_NONE 0x00 /* no events */
#define EV_READ 0x01 /* ev_io detected read will not block */
#define EV_WRITE 0x02 /* ev_io detected write will not block */
#define EV_IOFDSET 0x80 /* internal use only */
#define EV__IOFDSET 0x80 /* internal use only */
#define EV_IO EV_READ /* alias for type-detection */
#define EV_TIMEOUT 0x00000100 /* timer timed out */
#define EV_PERIODIC 0x00000200 /* periodic timer timed out */
#define EV_SIGNAL 0x00000400 /* signal was received */
@ -530,7 +531,7 @@ void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revent
ev_set_cb ((ev), cb_); \
} while (0)
#define ev_io_set(ev,fd_,events_) do { (ev)->fd = (fd_); (ev)->events = (events_) | EV_IOFDSET; } while (0)
#define ev_io_set(ev,fd_,events_) do { (ev)->fd = (fd_); (ev)->events = (events_) | EV__IOFDSET; } while (0)
#define ev_timer_set(ev,after_,repeat_) do { ((ev_watcher_time *)(ev))->at = (after_); (ev)->repeat = (repeat_); } while (0)
#define ev_periodic_set(ev,ofs_,ival_,rcb_) do { (ev)->offset = (ofs_); (ev)->interval = (ival_); (ev)->reschedule_cb = (rcb_); } while (0)
#define ev_signal_set(ev,signum_) do { (ev)->signum = (signum_); } while (0)

Loading…
Cancel
Save