diff options
author | root <root> | 2007-11-03 21:58:51 +0000 |
---|---|---|
committer | root <root> | 2007-11-03 21:58:51 +0000 |
commit | 228b0b302ab0857b23efad5a8b2429de2c0ccc00 (patch) | |
tree | fc54cf6a81f9c0267619258e80c471c1872c7070 /ev_select.c | |
parent | b5304cc456ee27383d787591037f5d15ca3b274f (diff) |
prepare for multiple bases
Diffstat (limited to 'ev_select.c')
-rw-r--r-- | ev_select.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/ev_select.c b/ev_select.c index a0db3b6..05dc30a 100644 --- a/ev_select.c +++ b/ev_select.c @@ -42,11 +42,8 @@ #include <string.h> #include <inttypes.h> -static unsigned char *vec_ri, *vec_ro, *vec_wi, *vec_wo; -static int vec_max; - static void -select_modify (int fd, int oev, int nev) +select_modify (EV_P_ int fd, int oev, int nev) { int offs = fd >> 3; int mask = 1 << (fd & 7); @@ -75,7 +72,7 @@ select_modify (int fd, int oev, int nev) } static void -select_poll (ev_tstamp timeout) +select_poll (EV_P_ ev_tstamp timeout) { struct timeval tv; int res; @@ -124,12 +121,13 @@ select_poll (ev_tstamp timeout) } } -static void -select_init (int flags) +static int +select_init (EV_P_ int flags) { - ev_method = EVMETHOD_SELECT; method_fudge = 1e-2; /* needed to compensate for select returning early, very conservative */ method_modify = select_modify; method_poll = select_poll; + + return EVMETHOD_SELECT; } |