summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2009-03-16 21:15:06 +0000
committerroot <root>2009-03-16 21:15:06 +0000
commita688564a1855e80fc024d870b76e82ad1d3469ab (patch)
tree75ac8e5f6166c3a5fb22cfcaf0d1a3c357c33f13
parent07a30d19ef7195fc361d41d9de3debc4562277c3 (diff)
*** empty log message ***
-rw-r--r--Changes2
-rw-r--r--ev.c10
-rw-r--r--ev.h5
3 files changed, 10 insertions, 7 deletions
diff --git a/Changes b/Changes
index cacef1d..092b419 100644
--- a/Changes
+++ b/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).
diff --git a/ev.c b/ev.c
index 57b1f31..f98bc75 100644
--- a/ev.c
+++ b/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;
}
diff --git a/ev.h b/ev.h
index 473d4ae..4f22703 100644
--- a/ev.h
+++ b/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)