--- EV/EV.xs 2007/10/31 14:44:35 1.21 +++ EV/EV.xs 2007/10/31 18:28:00 1.22 @@ -5,7 +5,7 @@ /*#include */ #define TIMEOUT_NONE HUGE_VAL -#define HAVE_EPOLL 0 +#define HAVE_EPOLL 1 #define EV_PROTOTYPES 1 #include "EV/EVAPI.h" @@ -24,6 +24,7 @@ *stash_periodic, *stash_signal, *stash_idle, + *stash_prepare, *stash_check; static int @@ -243,6 +244,7 @@ stash_periodic = gv_stashpv ("EV::Periodic", 1); stash_signal = gv_stashpv ("EV::Signal" , 1); stash_idle = gv_stashpv ("EV::Idle" , 1); + stash_prepare = gv_stashpv ("EV::Prepare" , 1); stash_check = gv_stashpv ("EV::Check" , 1); { @@ -271,6 +273,8 @@ evapi.signal_stop = evsignal_stop; evapi.idle_start = evidle_start; evapi.idle_stop = evidle_stop; + evapi.prepare_start = evprepare_start; + evapi.prepare_stop = evprepare_stop; evapi.check_start = evcheck_start; evapi.check_stop = evcheck_stop; @@ -356,6 +360,16 @@ OUTPUT: RETVAL +struct ev_prepare *prepare (SV *cb) + ALIAS: + prepare_ns = 1 + CODE: + RETVAL = e_new (sizeof (struct ev_prepare), cb); + evprepare_set (RETVAL); + if (!ix) evprepare_start (RETVAL); + OUTPUT: + RETVAL + struct ev_check *check (SV *cb) ALIAS: check_ns = 1 @@ -506,6 +520,12 @@ void evidle_stop (struct ev_idle *w) +MODULE = EV PACKAGE = EV::Prepare PREFIX = evcheck_ + +void evprepare_start (struct ev_prepare *w) + +void evprepare_stop (struct ev_prepare *w) + MODULE = EV PACKAGE = EV::Check PREFIX = evcheck_ void evcheck_start (struct ev_check *w)