summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
authorroot <root>2007-11-26 20:33:58 +0000
committerroot <root>2007-11-26 20:33:58 +0000
commit92dcada736d22a0f8f2ed4351713c0299db32138 (patch)
tree8e8919c365cd3c08bcd880d6f3d54cb017d43bec /ev.c
parentb7e58d7ed7f85d7cb7fe1c34cfe3fa2484a6dc31 (diff)
misc
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c42
1 files changed, 22 insertions, 20 deletions
diff --git a/ev.c b/ev.c
index 96d297c..8c1337f 100644
--- a/ev.c
+++ b/ev.c
@@ -227,12 +227,13 @@ static int have_monotonic; /* did clock_gettime (CLOCK_MONOTONIC) work? */
static void (*syserr_cb)(const char *msg);
-void ev_set_syserr_cb (void (*cb)(const char *msg))
+void
+ev_set_syserr_cb (void (*cb)(const char *msg))
{
syserr_cb = cb;
}
-static void
+static void noinline
syserr (const char *msg)
{
if (!msg)
@@ -249,7 +250,8 @@ syserr (const char *msg)
static void *(*alloc)(void *ptr, long size);
-void ev_set_allocator (void *(*cb)(void *ptr, long size))
+void
+ev_set_allocator (void *(*cb)(void *ptr, long size))
{
alloc = cb;
}
@@ -317,7 +319,7 @@ typedef struct
/*****************************************************************************/
-ev_tstamp noinline
+ev_tstamp
ev_time (void)
{
#if EV_USE_REALTIME
@@ -384,19 +386,6 @@ ev_now (EV_P)
/*****************************************************************************/
-void inline_size
-anfds_init (ANFD *base, int count)
-{
- while (count--)
- {
- base->head = 0;
- base->events = EV_NONE;
- base->reify = 0;
-
- ++base;
- }
-}
-
void noinline
ev_feed_event (EV_P_ void *w, int revents)
{
@@ -414,7 +403,7 @@ ev_feed_event (EV_P_ void *w, int revents)
pendings [ABSPRI (w_)][w_->pending - 1].events = revents;
}
-static void
+void inline_size
queue_events (EV_P_ W *events, int eventcnt, int type)
{
int i;
@@ -423,6 +412,21 @@ queue_events (EV_P_ W *events, int eventcnt, int type)
ev_feed_event (EV_A_ events [i], type);
}
+/*****************************************************************************/
+
+void inline_size
+anfds_init (ANFD *base, int count)
+{
+ while (count--)
+ {
+ base->head = 0;
+ base->events = EV_NONE;
+ base->reify = 0;
+
+ ++base;
+ }
+}
+
void inline_speed
fd_event (EV_P_ int fd, int revents)
{
@@ -444,8 +448,6 @@ ev_feed_fd_event (EV_P_ int fd, int revents)
fd_event (EV_A_ fd, revents);
}
-/*****************************************************************************/
-
void inline_size
fd_reify (EV_P)
{