Browse Source

*** empty log message ***

master
Marc Alexander Lehmann 2 years ago
parent
commit
e6c8317b40
5 changed files with 238 additions and 235 deletions
  1. +3
    -0
      Changes
  2. +82
    -82
      ev++.h
  3. +73
    -73
      ev.c
  4. +78
    -78
      ev.h
  5. +2
    -2
      ev_vars.h

+ 3
- 0
Changes View File

@ -6,6 +6,9 @@ Revision history for libev, a high-performance and full-featured event loop.
- disable epoll_create1 on android because it has broken header files
and google is unwilling to fix them (reported by enh@google.com).
- avoid a minor compilation warning on win32.
- c++: rename EV_THROW to EV_NOEXCEPT
- c++: remove deprecated dynamic throw() specifications.
- c++: improve the (unsupported) bad_loop exception class.
4.24 Wed Dec 28 05:19:55 CET 2016
- bump version to 4.24, as the release tarball inexplicably


+ 82
- 82
ev++.h View File

@ -113,13 +113,13 @@ namespace ev {
struct bad_loop
#if EV_USE_STDEXCEPT
: std::runtime_error
: std::exception
#endif
{
#if EV_USE_STDEXCEPT
bad_loop ()
: std::runtime_error ("libev event loop cannot be initialized, bad value of LIBEV_FLAGS?")
const char *what () const EV_NOEXCEPT
{
return "libev event loop cannot be initialized, bad value of LIBEV_FLAGS?";
}
#endif
};
@ -142,14 +142,14 @@ namespace ev {
struct loop_ref
{
loop_ref (EV_P) throw ()
loop_ref (EV_P) EV_NOEXCEPT
#if EV_MULTIPLICITY
: EV_AX (EV_A)
#endif
{
}
bool operator == (const loop_ref &other) const throw ()
bool operator == (const loop_ref &other) const EV_NOEXCEPT
{
#if EV_MULTIPLICITY
return EV_AX == other.EV_AX;
@ -158,7 +158,7 @@ namespace ev {
#endif
}
bool operator != (const loop_ref &other) const throw ()
bool operator != (const loop_ref &other) const EV_NOEXCEPT
{
#if EV_MULTIPLICITY
return ! (*this == other);
@ -168,27 +168,27 @@ namespace ev {
}
#if EV_MULTIPLICITY
bool operator == (const EV_P) const throw ()
bool operator == (const EV_P) const EV_NOEXCEPT
{
return this->EV_AX == EV_A;
}
bool operator != (const EV_P) const throw ()
bool operator != (const EV_P) const EV_NOEXCEPT
{
return ! (*this == EV_A);
}
operator struct ev_loop * () const throw ()
operator struct ev_loop * () const EV_NOEXCEPT
{
return EV_AX;
}
operator const struct ev_loop * () const throw ()
operator const struct ev_loop * () const EV_NOEXCEPT
{
return EV_AX;
}
bool is_default () const throw ()
bool is_default () const EV_NOEXCEPT
{
return EV_AX == ev_default_loop (0);
}
@ -200,7 +200,7 @@ namespace ev {
ev_run (EV_AX_ flags);
}
void unloop (how_t how = ONE) throw ()
void unloop (how_t how = ONE) EV_NOEXCEPT
{
ev_break (EV_AX_ how);
}
@ -211,74 +211,74 @@ namespace ev {
ev_run (EV_AX_ flags);
}
void break_loop (how_t how = ONE) throw ()
void break_loop (how_t how = ONE) EV_NOEXCEPT
{
ev_break (EV_AX_ how);
}
void post_fork () throw ()
void post_fork () EV_NOEXCEPT
{
ev_loop_fork (EV_AX);
}
unsigned int backend () const throw ()
unsigned int backend () const EV_NOEXCEPT
{
return ev_backend (EV_AX);
}
tstamp now () const throw ()
tstamp now () const EV_NOEXCEPT
{
return ev_now (EV_AX);
}
void ref () throw ()
void ref () EV_NOEXCEPT
{
ev_ref (EV_AX);
}
void unref () throw ()
void unref () EV_NOEXCEPT
{
ev_unref (EV_AX);
}
#if EV_FEATURE_API
unsigned int iteration () const throw ()
unsigned int iteration () const EV_NOEXCEPT
{
return ev_iteration (EV_AX);
}
unsigned int depth () const throw ()
unsigned int depth () const EV_NOEXCEPT
{
return ev_depth (EV_AX);
}
void set_io_collect_interval (tstamp interval) throw ()
void set_io_collect_interval (tstamp interval) EV_NOEXCEPT
{
ev_set_io_collect_interval (EV_AX_ interval);
}
void set_timeout_collect_interval (tstamp interval) throw ()
void set_timeout_collect_interval (tstamp interval) EV_NOEXCEPT
{
ev_set_timeout_collect_interval (EV_AX_ interval);
}
#endif
// function callback
void once (int fd, int events, tstamp timeout, void (*cb)(int, void *), void *arg = 0) throw ()
void once (int fd, int events, tstamp timeout, void (*cb)(int, void *), void *arg = 0) EV_NOEXCEPT
{
ev_once (EV_AX_ fd, events, timeout, cb, arg);
}
// method callback
template<class K, void (K::*method)(int)>
void once (int fd, int events, tstamp timeout, K *object) throw ()
void once (int fd, int events, tstamp timeout, K *object) EV_NOEXCEPT
{
once (fd, events, timeout, method_thunk<K, method>, object);
}
// default method == operator ()
template<class K>
void once (int fd, int events, tstamp timeout, K *object) throw ()
void once (int fd, int events, tstamp timeout, K *object) EV_NOEXCEPT
{
once (fd, events, timeout, method_thunk<K, &K::operator ()>, object);
}
@ -292,7 +292,7 @@ namespace ev {
// no-argument method callback
template<class K, void (K::*method)()>
void once (int fd, int events, tstamp timeout, K *object) throw ()
void once (int fd, int events, tstamp timeout, K *object) EV_NOEXCEPT
{
once (fd, events, timeout, method_noargs_thunk<K, method>, object);
}
@ -306,7 +306,7 @@ namespace ev {
// simpler function callback
template<void (*cb)(int)>
void once (int fd, int events, tstamp timeout) throw ()
void once (int fd, int events, tstamp timeout) EV_NOEXCEPT
{
once (fd, events, timeout, simpler_func_thunk<cb>);
}
@ -320,7 +320,7 @@ namespace ev {
// simplest function callback
template<void (*cb)()>
void once (int fd, int events, tstamp timeout) throw ()
void once (int fd, int events, tstamp timeout) EV_NOEXCEPT
{
once (fd, events, timeout, simplest_func_thunk<cb>);
}
@ -332,12 +332,12 @@ namespace ev {
();
}
void feed_fd_event (int fd, int revents) throw ()
void feed_fd_event (int fd, int revents) EV_NOEXCEPT
{
ev_feed_fd_event (EV_AX_ fd, revents);
}
void feed_signal_event (int signum) throw ()
void feed_signal_event (int signum) EV_NOEXCEPT
{
ev_feed_signal_event (EV_AX_ signum);
}
@ -352,14 +352,14 @@ namespace ev {
struct dynamic_loop : loop_ref
{
dynamic_loop (unsigned int flags = AUTO) throw (bad_loop)
dynamic_loop (unsigned int flags = AUTO)
: loop_ref (ev_loop_new (flags))
{
if (!EV_AX)
throw bad_loop ();
}
~dynamic_loop () throw ()
~dynamic_loop () EV_NOEXCEPT
{
ev_loop_destroy (EV_AX);
EV_AX = 0;
@ -376,7 +376,7 @@ namespace ev {
struct default_loop : loop_ref
{
default_loop (unsigned int flags = AUTO) throw (bad_loop)
default_loop (unsigned int flags = AUTO)
#if EV_MULTIPLICITY
: loop_ref (ev_default_loop (flags))
#endif
@ -396,7 +396,7 @@ namespace ev {
default_loop &operator = (const default_loop &);
};
inline loop_ref get_default_loop () throw ()
inline loop_ref get_default_loop () EV_NOEXCEPT
{
#if EV_MULTIPLICITY
return ev_default_loop (0);
@ -425,13 +425,13 @@ namespace ev {
EV_PX;
// loop set
void set (EV_P) throw ()
void set (EV_P) EV_NOEXCEPT
{
this->EV_A = EV_A;
}
#endif
base (EV_PX) throw ()
base (EV_PX) EV_NOEXCEPT
#if EV_MULTIPLICITY
: EV_A (EV_A)
#endif
@ -439,7 +439,7 @@ namespace ev {
ev_init (this, 0);
}
void set_ (const void *data, void (*cb)(EV_P_ ev_watcher *w, int revents)) throw ()
void set_ (const void *data, void (*cb)(EV_P_ ev_watcher *w, int revents)) EV_NOEXCEPT
{
this->data = (void *)data;
ev_set_cb (static_cast<ev_watcher *>(this), cb);
@ -447,7 +447,7 @@ namespace ev {
// function callback
template<void (*function)(watcher &w, int)>
void set (void *data = 0) throw ()
void set (void *data = 0) EV_NOEXCEPT
{
set_ (data, function_thunk<function>);
}
@ -461,14 +461,14 @@ namespace ev {
// method callback
template<class K, void (K::*method)(watcher &w, int)>
void set (K *object) throw ()
void set (K *object) EV_NOEXCEPT
{
set_ (object, method_thunk<K, method>);
}
// default method == operator ()
template<class K>
void set (K *object) throw ()
void set (K *object) EV_NOEXCEPT
{
set_ (object, method_thunk<K, &K::operator ()>);
}
@ -482,7 +482,7 @@ namespace ev {
// no-argument callback
template<class K, void (K::*method)()>
void set (K *object) throw ()
void set (K *object) EV_NOEXCEPT
{
set_ (object, method_noargs_thunk<K, method>);
}
@ -501,76 +501,76 @@ namespace ev {
(static_cast<ev_watcher *>(this), events);
}
bool is_active () const throw ()
bool is_active () const EV_NOEXCEPT
{
return ev_is_active (static_cast<const ev_watcher *>(this));
}
bool is_pending () const throw ()
bool is_pending () const EV_NOEXCEPT
{
return ev_is_pending (static_cast<const ev_watcher *>(this));
}
void feed_event (int revents) throw ()
void feed_event (int revents) EV_NOEXCEPT
{
ev_feed_event (EV_A_ static_cast<ev_watcher *>(this), revents);
}
};
inline tstamp now (EV_P) throw ()
inline tstamp now (EV_P) EV_NOEXCEPT
{
return ev_now (EV_A);
}
inline void delay (tstamp interval) throw ()
inline void delay (tstamp interval) EV_NOEXCEPT
{
ev_sleep (interval);
}
inline int version_major () throw ()
inline int version_major () EV_NOEXCEPT
{
return ev_version_major ();
}
inline int version_minor () throw ()
inline int version_minor () EV_NOEXCEPT
{
return ev_version_minor ();
}
inline unsigned int supported_backends () throw ()
inline unsigned int supported_backends () EV_NOEXCEPT
{
return ev_supported_backends ();
}
inline unsigned int recommended_backends () throw ()
inline unsigned int recommended_backends () EV_NOEXCEPT
{
return ev_recommended_backends ();
}
inline unsigned int embeddable_backends () throw ()
inline unsigned int embeddable_backends () EV_NOEXCEPT
{
return ev_embeddable_backends ();
}
inline void set_allocator (void *(*cb)(void *ptr, long size) throw ()) throw ()
inline void set_allocator (void *(*cb)(void *ptr, long size) EV_NOEXCEPT) EV_NOEXCEPT
{
ev_set_allocator (cb);
}
inline void set_syserr_cb (void (*cb)(const char *msg) throw ()) throw ()
inline void set_syserr_cb (void (*cb)(const char *msg) EV_NOEXCEPT) EV_NOEXCEPT
{
ev_set_syserr_cb (cb);
}
#if EV_MULTIPLICITY
#define EV_CONSTRUCT(cppstem,cstem) \
(EV_PX = get_default_loop ()) throw () \
(EV_PX = get_default_loop ()) EV_NOEXCEPT \
: base<ev_ ## cstem, cppstem> (EV_A) \
{ \
}
#else
#define EV_CONSTRUCT(cppstem,cstem) \
() throw () \
() EV_NOEXCEPT \
{ \
}
#endif
@ -581,19 +581,19 @@ namespace ev {
\
struct cppstem : base<ev_ ## cstem, cppstem> \
{ \
void start () throw () \
void start () EV_NOEXCEPT \
{ \
ev_ ## cstem ## _start (EV_A_ static_cast<ev_ ## cstem *>(this)); \
} \
\
void stop () throw () \
void stop () EV_NOEXCEPT \
{ \
ev_ ## cstem ## _stop (EV_A_ static_cast<ev_ ## cstem *>(this)); \
} \
\
cppstem EV_CONSTRUCT(cppstem,cstem) \
\
~cppstem () throw () \
~cppstem () EV_NOEXCEPT \
{ \
stop (); \
} \
@ -612,7 +612,7 @@ namespace ev {
};
EV_BEGIN_WATCHER (io, io)
void set (int fd, int events) throw ()
void set (int fd, int events) EV_NOEXCEPT
{
int active = is_active ();
if (active) stop ();
@ -620,7 +620,7 @@ namespace ev {
if (active) start ();
}
void set (int events) throw ()
void set (int events) EV_NOEXCEPT
{
int active = is_active ();
if (active) stop ();
@ -628,7 +628,7 @@ namespace ev {
if (active) start ();
}
void start (int fd, int events) throw ()
void start (int fd, int events) EV_NOEXCEPT
{
set (fd, events);
start ();
@ -636,7 +636,7 @@ namespace ev {
EV_END_WATCHER (io, io)
EV_BEGIN_WATCHER (timer, timer)
void set (ev_tstamp after, ev_tstamp repeat = 0.) throw ()
void set (ev_tstamp after, ev_tstamp repeat = 0.) EV_NOEXCEPT
{
int active = is_active ();
if (active) stop ();
@ -644,13 +644,13 @@ namespace ev {
if (active) start ();
}
void start (ev_tstamp after, ev_tstamp repeat = 0.) throw ()
void start (ev_tstamp after, ev_tstamp repeat = 0.) EV_NOEXCEPT
{
set (after, repeat);
start ();
}
void again () throw ()
void again () EV_NOEXCEPT
{
ev_timer_again (EV_A_ static_cast<ev_timer *>(this));
}
@ -663,7 +663,7 @@ namespace ev {
#if EV_PERIODIC_ENABLE
EV_BEGIN_WATCHER (periodic, periodic)
void set (ev_tstamp at, ev_tstamp interval = 0.) throw ()
void set (ev_tstamp at, ev_tstamp interval = 0.) EV_NOEXCEPT
{
int active = is_active ();
if (active) stop ();
@ -671,13 +671,13 @@ namespace ev {
if (active) start ();
}
void start (ev_tstamp at, ev_tstamp interval = 0.) throw ()
void start (ev_tstamp at, ev_tstamp interval = 0.) EV_NOEXCEPT
{
set (at, interval);
start ();
}
void again () throw ()
void again () EV_NOEXCEPT
{
ev_periodic_again (EV_A_ static_cast<ev_periodic *>(this));
}
@ -686,7 +686,7 @@ namespace ev {
#if EV_SIGNAL_ENABLE
EV_BEGIN_WATCHER (sig, signal)
void set (int signum) throw ()
void set (int signum) EV_NOEXCEPT
{
int active = is_active ();
if (active) stop ();
@ -694,7 +694,7 @@ namespace ev {
if (active) start ();
}
void start (int signum) throw ()
void start (int signum) EV_NOEXCEPT
{
set (signum);
start ();
@ -704,7 +704,7 @@ namespace ev {
#if EV_CHILD_ENABLE
EV_BEGIN_WATCHER (child, child)
void set (int pid, int trace = 0) throw ()
void set (int pid, int trace = 0) EV_NOEXCEPT
{
int active = is_active ();
if (active) stop ();
@ -712,7 +712,7 @@ namespace ev {
if (active) start ();
}
void start (int pid, int trace = 0) throw ()
void start (int pid, int trace = 0) EV_NOEXCEPT
{
set (pid, trace);
start ();
@ -722,7 +722,7 @@ namespace ev {
#if EV_STAT_ENABLE
EV_BEGIN_WATCHER (stat, stat)
void set (const char *path, ev_tstamp interval = 0.) throw ()
void set (const char *path, ev_tstamp interval = 0.) EV_NOEXCEPT
{
int active = is_active ();
if (active) stop ();
@ -730,14 +730,14 @@ namespace ev {
if (active) start ();
}
void start (const char *path, ev_tstamp interval = 0.) throw ()
void start (const char *path, ev_tstamp interval = 0.) EV_NOEXCEPT
{
stop ();
set (path, interval);
start ();
}
void update () throw ()
void update () EV_NOEXCEPT
{
ev_stat_stat (EV_A_ static_cast<ev_stat *>(this));
}
@ -746,25 +746,25 @@ namespace ev {
#if EV_IDLE_ENABLE
EV_BEGIN_WATCHER (idle, idle)
void set () throw () { }
void set () EV_NOEXCEPT { }
EV_END_WATCHER (idle, idle)
#endif
#if EV_PREPARE_ENABLE
EV_BEGIN_WATCHER (prepare, prepare)
void set () throw () { }
void set () EV_NOEXCEPT { }
EV_END_WATCHER (prepare, prepare)
#endif
#if EV_CHECK_ENABLE
EV_BEGIN_WATCHER (check, check)
void set () throw () { }
void set () EV_NOEXCEPT { }
EV_END_WATCHER (check, check)
#endif
#if EV_EMBED_ENABLE
EV_BEGIN_WATCHER (embed, embed)
void set_embed (struct ev_loop *embedded_loop) throw ()
void set_embed (struct ev_loop *embedded_loop) EV_NOEXCEPT
{
int active = is_active ();
if (active) stop ();
@ -772,7 +772,7 @@ namespace ev {
if (active) start ();
}
void start (struct ev_loop *embedded_loop) throw ()
void start (struct ev_loop *embedded_loop) EV_NOEXCEPT
{
set (embedded_loop);
start ();
@ -787,18 +787,18 @@ namespace ev {
#if EV_FORK_ENABLE
EV_BEGIN_WATCHER (fork, fork)
void set () throw () { }
void set () EV_NOEXCEPT { }
EV_END_WATCHER (fork, fork)
#endif
#if EV_ASYNC_ENABLE
EV_BEGIN_WATCHER (async, async)
void send () throw ()
void send () EV_NOEXCEPT
{
ev_async_send (EV_A_ static_cast<ev_async *>(this));
}
bool async_pending () throw ()
bool async_pending () EV_NOEXCEPT
{
return ev_async_pending (static_cast<ev_async *>(this));
}


+ 73
- 73
ev.c View File

@ -1679,11 +1679,11 @@ ev_printerr (const char *msg)
}
#endif
static void (*syserr_cb)(const char *msg) EV_THROW;
static void (*syserr_cb)(const char *msg) EV_NOEXCEPT;
ecb_cold
void
ev_set_syserr_cb (void (*cb)(const char *msg) EV_THROW) EV_THROW
ev_set_syserr_cb (void (*cb)(const char *msg) EV_NOEXCEPT) EV_NOEXCEPT
{
syserr_cb = cb;
}
@ -1712,7 +1712,7 @@ ev_syserr (const char *msg)
}
static void *
ev_realloc_emul (void *ptr, long size) EV_THROW
ev_realloc_emul (void *ptr, long size) EV_NOEXCEPT
{
/* some systems, notably openbsd and darwin, fail to properly
* implement realloc (x, 0) (as required by both ansi c-89 and
@ -1728,11 +1728,11 @@ ev_realloc_emul (void *ptr, long size) EV_THROW
return 0;
}
static void *(*alloc)(void *ptr, long size) EV_THROW = ev_realloc_emul;
static void *(*alloc)(void *ptr, long size) EV_NOEXCEPT = ev_realloc_emul;
ecb_cold
void
ev_set_allocator (void *(*cb)(void *ptr, long size) EV_THROW) EV_THROW
ev_set_allocator (void *(*cb)(void *ptr, long size) EV_NOEXCEPT) EV_NOEXCEPT
{
alloc = cb;
}
@ -1859,7 +1859,7 @@ typedef struct
#ifndef EV_HAVE_EV_TIME
ev_tstamp
ev_time (void) EV_THROW
ev_time (void) EV_NOEXCEPT
{
#if EV_USE_REALTIME
if (expect_true (have_realtime))
@ -1893,14 +1893,14 @@ get_clock (void)
#if EV_MULTIPLICITY
ev_tstamp
ev_now (EV_P) EV_THROW
ev_now (EV_P) EV_NOEXCEPT
{
return ev_rt_now;
}
#endif
void
ev_sleep (ev_tstamp delay) EV_THROW
ev_sleep (ev_tstamp delay) EV_NOEXCEPT
{
if (delay > 0.)
{
@ -1996,7 +1996,7 @@ pendingcb (EV_P_ ev_prepare *w, int revents)
noinline
void
ev_feed_event (EV_P_ void *w, int revents) EV_THROW
ev_feed_event (EV_P_ void *w, int revents) EV_NOEXCEPT
{
W w_ = (W)w;
int pri = ABSPRI (w_);
@ -2067,7 +2067,7 @@ fd_event (EV_P_ int fd, int revents)
}
void
ev_feed_fd_event (EV_P_ int fd, int revents) EV_THROW
ev_feed_fd_event (EV_P_ int fd, int revents) EV_NOEXCEPT
{
if (fd >= 0 && fd < anfdmax)
fd_event_nocheck (EV_A_ fd, revents);
@ -2559,7 +2559,7 @@ pipecb (EV_P_ ev_io *iow, int revents)
/*****************************************************************************/
void
ev_feed_signal (int signum) EV_THROW
ev_feed_signal (int signum) EV_NOEXCEPT
{
#if EV_MULTIPLICITY
EV_P;
@ -2586,7 +2586,7 @@ ev_sighandler (int signum)
noinline
void
ev_feed_signal_event (EV_P_ int signum) EV_THROW
ev_feed_signal_event (EV_P_ int signum) EV_NOEXCEPT
{
WL w;
@ -2713,13 +2713,13 @@ childcb (EV_P_ ev_signal *sw, int revents)
#endif
ecb_cold int
ev_version_major (void) EV_THROW
ev_version_major (void) EV_NOEXCEPT
{
return EV_VERSION_MAJOR;
}
ecb_cold int
ev_version_minor (void) EV_THROW
ev_version_minor (void) EV_NOEXCEPT
{
return EV_VERSION_MINOR;
}
@ -2738,7 +2738,7 @@ enable_secure (void)
ecb_cold
unsigned int
ev_supported_backends (void) EV_THROW
ev_supported_backends (void) EV_NOEXCEPT
{
unsigned int flags = 0;
@ -2753,7 +2753,7 @@ ev_supported_backends (void) EV_THROW
ecb_cold
unsigned int
ev_recommended_backends (void) EV_THROW
ev_recommended_backends (void) EV_NOEXCEPT
{
unsigned int flags = ev_supported_backends ();
@ -2776,7 +2776,7 @@ ev_recommended_backends (void) EV_THROW
ecb_cold
unsigned int
ev_embeddable_backends (void) EV_THROW
ev_embeddable_backends (void) EV_NOEXCEPT
{
int flags = EVBACKEND_EPOLL | EVBACKEND_KQUEUE | EVBACKEND_PORT;
@ -2788,56 +2788,56 @@ ev_embeddable_backends (void) EV_THROW
}
unsigned int
ev_backend (EV_P) EV_THROW
ev_backend (EV_P) EV_NOEXCEPT
{
return backend;
}
#if EV_FEATURE_API
unsigned int
ev_iteration (EV_P) EV_THROW
ev_iteration (EV_P) EV_NOEXCEPT
{
return loop_count;
}
unsigned int
ev_depth (EV_P) EV_THROW
ev_depth (EV_P) EV_NOEXCEPT
{
return loop_depth;
}
void
ev_set_io_collect_interval (EV_P_ ev_tstamp interval) EV_THROW
ev_set_io_collect_interval (EV_P_ ev_tstamp interval) EV_NOEXCEPT
{
io_blocktime = interval;
}
void
ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval) EV_THROW
ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval) EV_NOEXCEPT
{
timeout_blocktime = interval;
}
void
ev_set_userdata (EV_P_ void *data) EV_THROW
ev_set_userdata (EV_P_ void *data) EV_NOEXCEPT
{
userdata = data;
}
void *
ev_userdata (EV_P) EV_THROW
ev_userdata (EV_P) EV_NOEXCEPT
{
return userdata;
}
void
ev_set_invoke_pending_cb (EV_P_ ev_loop_callback invoke_pending_cb) EV_THROW
ev_set_invoke_pending_cb (EV_P_ ev_loop_callback invoke_pending_cb) EV_NOEXCEPT
{
invoke_cb = invoke_pending_cb;
}
void
ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_THROW, void (*acquire)(EV_P) EV_THROW) EV_THROW
ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_NOEXCEPT, void (*acquire)(EV_P) EV_NOEXCEPT) EV_NOEXCEPT
{
release_cb = release;
acquire_cb = acquire;
@ -2847,7 +2847,7 @@ ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_THROW, void (*acquire)(EV
/* initialise a loop structure, must be zero-initialised */
noinline ecb_cold
static void
loop_init (EV_P_ unsigned int flags) EV_THROW
loop_init (EV_P_ unsigned int flags) EV_NOEXCEPT
{
if (!backend)
{
@ -3098,7 +3098,7 @@ loop_fork (EV_P)
ecb_cold
struct ev_loop *
ev_loop_new (unsigned int flags) EV_THROW
ev_loop_new (unsigned int flags) EV_NOEXCEPT
{
EV_P = (struct ev_loop *)ev_malloc (sizeof (struct ev_loop));
@ -3155,7 +3155,7 @@ array_verify (EV_P_ W *ws, int cnt)
#if EV_FEATURE_API
void ecb_cold
ev_verify (EV_P) EV_THROW
ev_verify (EV_P) EV_NOEXCEPT
{
#if EV_VERIFY
int i;
@ -3246,7 +3246,7 @@ struct ev_loop *
#else
int
#endif
ev_default_loop (unsigned int flags) EV_THROW
ev_default_loop (unsigned int flags) EV_NOEXCEPT
{
if (!ev_default_loop_ptr)
{
@ -3275,7 +3275,7 @@ ev_default_loop (unsigned int flags) EV_THROW
}
void
ev_loop_fork (EV_P) EV_THROW
ev_loop_fork (EV_P) EV_NOEXCEPT
{
postfork = 1;
}
@ -3289,7 +3289,7 @@ ev_invoke (EV_P_ void *w, int revents)
}
unsigned int
ev_pending_count (EV_P) EV_THROW
ev_pending_count (EV_P) EV_NOEXCEPT
{
int pri;
unsigned int count = 0;
@ -3739,37 +3739,37 @@ ev_run (EV_P_ int flags)
}
void
ev_break (EV_P_ int how) EV_THROW
ev_break (EV_P_ int how) EV_NOEXCEPT
{
loop_done = how;
}
void
ev_ref (EV_P) EV_THROW
ev_ref (EV_P) EV_NOEXCEPT
{
++activecnt;
}
void
ev_unref (EV_P) EV_THROW
ev_unref (EV_P) EV_NOEXCEPT
{
--activecnt;
}
void
ev_now_update (EV_P) EV_THROW
ev_now_update (EV_P) EV_NOEXCEPT
{
time_update (EV_A_ 1e100);
}
void
ev_suspend (EV_P) EV_THROW
ev_suspend (EV_P) EV_NOEXCEPT
{
ev_now_update (EV_A);
}
void
ev_resume (EV_P) EV_THROW
ev_resume (EV_P) EV_NOEXCEPT
{
ev_tstamp mn_prev = mn_now;
@ -3818,7 +3818,7 @@ clear_pending (EV_P_ W w)
}
int
ev_clear_pending (EV_P_ void *w) EV_THROW
ev_clear_pending (EV_P_ void *w) EV_NOEXCEPT
{
W w_ = (W)w;
int pending = w_->pending;
@ -3862,7 +3862,7 @@ ev_stop (EV_P_ W w)
noinline
void
ev_io_start (EV_P_ ev_io *w) EV_THROW
ev_io_start (EV_P_ ev_io *w) EV_NOEXCEPT
{
int fd = w->fd;
@ -3889,7 +3889,7 @@ ev_io_start (EV_P_ ev_io *w) EV_THROW
noinline
void
ev_io_stop (EV_P_ ev_io *w) EV_THROW
ev_io_stop (EV_P_ ev_io *w) EV_NOEXCEPT
{
clear_pending (EV_A_ (W)w);
if (expect_false (!ev_is_active (w)))
@ -3909,7 +3909,7 @@ ev_io_stop (EV_P_ ev_io *w) EV_THROW
noinline
void
ev_timer_start (EV_P_ ev_timer *w) EV_THROW
ev_timer_start (EV_P_ ev_timer *w) EV_NOEXCEPT
{
if (expect_false (ev_is_active (w)))
return;
@ -3934,7 +3934,7 @@ ev_timer_start (EV_P_ ev_timer *w) EV_THROW
noinline
void
ev_timer_stop (EV_P_ ev_timer *w) EV_THROW
ev_timer_stop (EV_P_ ev_timer *w) EV_NOEXCEPT
{
clear_pending (EV_A_ (W)w);
if (expect_false (!ev_is_active (w)))
@ -3965,7 +3965,7 @@ ev_timer_stop (EV_P_ ev_timer *w) EV_THROW
noinline
void
ev_timer_again (EV_P_ ev_timer *w) EV_THROW
ev_timer_again (EV_P_ ev_timer *w) EV_NOEXCEPT
{
EV_FREQUENT_CHECK;
@ -3992,7 +3992,7 @@ ev_timer_again (EV_P_ ev_timer *w) EV_THROW
}
ev_tstamp
ev_timer_remaining (EV_P_ ev_timer *w) EV_THROW
ev_timer_remaining (EV_P_ ev_timer *w) EV_NOEXCEPT
{
return ev_at (w) - (ev_is_active (w) ? mn_now : 0.);
}
@ -4000,7 +4000,7 @@ ev_timer_remaining (EV_P_ ev_timer *w) EV_THROW
#if EV_PERIODIC_ENABLE
noinline
void
ev_periodic_start (EV_P_ ev_periodic *w) EV_THROW
ev_periodic_start (EV_P_ ev_periodic *w) EV_NOEXCEPT
{
if (expect_false (ev_is_active (w)))
return;
@ -4031,7 +4031,7 @@ ev_periodic_start (EV_P_ ev_periodic *w) EV_THROW
noinline
void
ev_periodic_stop (EV_P_ ev_periodic *w) EV_THROW
ev_periodic_stop (EV_P_ ev_periodic *w) EV_NOEXCEPT
{
clear_pending (EV_A_ (W)w);
if (expect_false (!ev_is_active (w)))
@ -4060,7 +4060,7 @@ ev_periodic_stop (EV_P_ ev_periodic *w) EV_THROW
noinline
void
ev_periodic_again (EV_P_ ev_periodic *w) EV_THROW
ev_periodic_again (EV_P_ ev_periodic *w) EV_NOEXCEPT
{
/* TODO: use adjustheap and recalculation */
ev_periodic_stop (EV_A_ w);
@ -4076,7 +4076,7 @@ ev_periodic_again (EV_P_ ev_periodic *w) EV_THROW
noinline
void
ev_signal_start (EV_P_ ev_signal *w) EV_THROW
ev_signal_start (EV_P_ ev_signal *w) EV_NOEXCEPT
{
if (expect_false (ev_is_active (w)))
return;
@ -4159,7 +4159,7 @@ ev_signal_start (EV_P_ ev_signal *w) EV_THROW
noinline
void
ev_signal_stop (EV_P_ ev_signal *w) EV_THROW
ev_signal_stop (EV_P_ ev_signal *w) EV_NOEXCEPT
{
clear_pending (EV_A_ (W)w);
if (expect_false (!ev_is_active (w)))
@ -4200,7 +4200,7 @@ ev_signal_stop (EV_P_ ev_signal *w) EV_THROW
#if EV_CHILD_ENABLE
void
ev_child_start (EV_P_ ev_child *w) EV_THROW
ev_child_start (EV_P_ ev_child *w) EV_NOEXCEPT
{
#if EV_MULTIPLICITY
assert (("libev: child watchers are only supported in the default loop", loop == ev_default_loop_ptr));
@ -4217,7 +4217,7 @@ ev_child_start (EV_P_ ev_child *w) EV_THROW
}
void
ev_child_stop (EV_P_ ev_child *w) EV_THROW
ev_child_stop (EV_P_ ev_child *w) EV_NOEXCEPT
{
clear_pending (EV_A_ (W)w);
if (expect_false (!ev_is_active (w)))
@ -4492,7 +4492,7 @@ infy_fork (EV_P)
#endif
void
ev_stat_stat (EV_P_ ev_stat *w) EV_THROW
ev_stat_stat (EV_P_ ev_stat *w) EV_NOEXCEPT
{
if (lstat (w->path, &w->attr) < 0)
w->attr.st_nlink = 0;
@ -4542,7 +4542,7 @@ stat_timer_cb (EV_P_ ev_timer *w_, int revents)
}
void
ev_stat_start (EV_P_ ev_stat *w) EV_THROW
ev_stat_start (EV_P_ ev_stat *w) EV_NOEXCEPT
{
if (expect_false (ev_is_active (w)))
return;
@ -4573,7 +4573,7 @@ ev_stat_start (EV_P_ ev_stat *w) EV_THROW
}
void
ev_stat_stop (EV_P_ ev_stat *w) EV_THROW
ev_stat_stop (EV_P_ ev_stat *w) EV_NOEXCEPT
{
clear_pending (EV_A_ (W)w);
if (expect_false (!ev_is_active (w)))
@ -4599,7 +4599,7 @@ ev_stat_stop (EV_P_ ev_stat *w) EV_THROW
#if EV_IDLE_ENABLE
void
ev_idle_start (EV_P_ ev_idle *w) EV_THROW
ev_idle_start (EV_P_ ev_idle *w) EV_NOEXCEPT
{
if (expect_false (ev_is_active (w)))
return;
@ -4622,7 +4622,7 @@ ev_idle_start (EV_P_ ev_idle *w) EV_THROW
}
void
ev_idle_stop (EV_P_ ev_idle *w) EV_THROW
ev_idle_stop (EV_P_ ev_idle *w) EV_NOEXCEPT
{
clear_pending (EV_A_ (W)w);
if (expect_false (!ev_is_active (w)))
@ -4646,7 +4646,7 @@ ev_idle_stop (EV_P_ ev_idle *w) EV_THROW
#if EV_PREPARE_ENABLE
void
ev_prepare_start (EV_P_ ev_prepare *w) EV_THROW
ev_prepare_start (EV_P_ ev_prepare *w) EV_NOEXCEPT
{
if (expect_false (ev_is_active (w)))
return;
@ -4661,7 +4661,7 @@ ev_prepare_start (EV_P_ ev_prepare *w) EV_THROW
}
void
ev_prepare_stop (EV_P_ ev_prepare *w) EV_THROW
ev_prepare_stop (EV_P_ ev_prepare *w) EV_NOEXCEPT
{
clear_pending (EV_A_ (W)w);
if (expect_false (!ev_is_active (w)))
@ -4684,7 +4684,7 @@ ev_prepare_stop (EV_P_ ev_prepare *w) EV_THROW
#if EV_CHECK_ENABLE
void
ev_check_start (EV_P_ ev_check *w) EV_THROW
ev_check_start (EV_P_ ev_check *w) EV_NOEXCEPT
{
if (expect_false (ev_is_active (w)))
return;
@ -4699,7 +4699,7 @@ ev_check_start (EV_P_ ev_check *w) EV_THROW
}
void
ev_check_stop (EV_P_ ev_check *w) EV_THROW
ev_check_stop (EV_P_ ev_check *w) EV_NOEXCEPT
{
clear_pending (EV_A_ (W)w);
if (expect_false (!ev_is_active (w)))
@ -4723,7 +4723,7 @@ ev_check_stop (EV_P_ ev_check *w) EV_THROW
#if EV_EMBED_ENABLE
noinline
void
ev_embed_sweep (EV_P_ ev_embed *w) EV_THROW
ev_embed_sweep (EV_P_ ev_embed *w) EV_NOEXCEPT
{
ev_run (w->other, EVRUN_NOWAIT);
}
@ -4781,7 +4781,7 @@ embed_idle_cb (EV_P_ ev_idle *idle, int revents)
#endif
void
ev_embed_start (EV_P_ ev_embed *w) EV_THROW
ev_embed_start (EV_P_ ev_embed *w) EV_NOEXCEPT
{
if (expect_false (ev_is_active (w)))
return;
@ -4812,7 +4812,7 @@ ev_embed_start (EV_P_ ev_embed *w) EV_THROW
}
void
ev_embed_stop (EV_P_ ev_embed *w) EV_THROW
ev_embed_stop (EV_P_ ev_embed *w) EV_NOEXCEPT
{
clear_pending (EV_A_ (W)w);
if (expect_false (!ev_is_active (w)))
@ -4832,7 +4832,7 @@ ev_embed_stop (EV_P_ ev_embed *w) EV_THROW
#if EV_FORK_ENABLE
void
ev_fork_start (EV_P_ ev_fork *w) EV_THROW
ev_fork_start (EV_P_ ev_fork *w) EV_NOEXCEPT
{
if (expect_false (ev_is_active (w)))
return;
@ -4847,7 +4847,7 @@ ev_fork_start (EV_P_ ev_fork *w) EV_THROW
}
void
ev_fork_stop (EV_P_ ev_fork *w) EV_THROW
ev_fork_stop (EV_P_ ev_fork *w) EV_NOEXCEPT
{
clear_pending (EV_A_ (W)w);
if (expect_false (!ev_is_active (w)))
@ -4870,7 +4870,7 @@ ev_fork_stop (EV_P_ ev_fork *w) EV_THROW
#if EV_CLEANUP_ENABLE
void
ev_cleanup_start (EV_P_ ev_cleanup *w) EV_THROW
ev_cleanup_start (EV_P_ ev_cleanup *w) EV_NOEXCEPT
{
if (expect_false (ev_is_active (w)))
return;
@ -4887,7 +4887,7 @@ ev_cleanup_start (EV_P_ ev_cleanup *w) EV_THROW
}
void
ev_cleanup_stop (EV_P_ ev_cleanup *w) EV_THROW
ev_cleanup_stop (EV_P_ ev_cleanup *w) EV_NOEXCEPT
{
clear_pending (EV_A_ (W)w);
if (expect_false (!ev_is_active (w)))
@ -4911,7 +4911,7 @@ ev_cleanup_stop (EV_P_ ev_cleanup *w) EV_THROW
#if EV_ASYNC_ENABLE
void
ev_async_start (EV_P_ ev_async *w) EV_THROW
ev_async_start (EV_P_ ev_async *w) EV_NOEXCEPT
{
if (expect_false (ev_is_active (w)))
return;
@ -4930,7 +4930,7 @@ ev_async_start (EV_P_ ev_async *w) EV_THROW
}
void
ev_async_stop (EV_P_ ev_async *w) EV_THROW
ev_async_stop (EV_P_ ev_async *w) EV_NOEXCEPT
{
clear_pending (EV_A_ (W)w);
if (expect_false (!ev_is_active (w)))
@ -4951,7 +4951,7 @@ ev_async_stop (EV_P_ ev_async *w) EV_THROW
}
void
ev_async_send (EV_P_ ev_async *w) EV_THROW
ev_async_send (EV_P_ ev_async *w) EV_NOEXCEPT
{
w->sent = 1;
evpipe_write (EV_A_ &async_pending);
@ -4998,7 +4998,7 @@ once_cb_to (EV_P_ ev_timer *w, int revents)
}
void
ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) EV_THROW
ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) EV_NOEXCEPT
{
struct ev_once *once = (struct ev_once *)ev_malloc (sizeof (struct ev_once));
@ -5031,7 +5031,7 @@ ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, vo
#if EV_WALK_ENABLE
ecb_cold
void
ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)) EV_THROW
ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)) EV_NOEXCEPT
{
int i, j;
ev_watcher_list *wl, *wn;


+ 78
- 78
ev.h View File

@ -43,13 +43,13 @@
#ifdef __cplusplus
# define EV_CPP(x) x
# if __cplusplus >= 201103L
# define EV_THROW noexcept
# define EV_NOEXCEPT noexcept
# else
# define EV_THROW throw ()
# define EV_NOEXCEPT
# endif
#else
# define EV_CPP(x)
# define EV_THROW
# define EV_NOEXCEPT
#endif
EV_CPP(extern "C" {)
@ -339,7 +339,7 @@ typedef struct ev_periodic
ev_tstamp offset; /* rw */
ev_tstamp interval; /* rw */
ev_tstamp (*reschedule_cb)(struct ev_periodic *w, ev_tstamp now) EV_THROW; /* rw */
ev_tstamp (*reschedule_cb)(struct ev_periodic *w, ev_tstamp now) EV_NOEXCEPT; /* rw */
} ev_periodic;
/* invoked when the given signal has been received */
@ -526,15 +526,15 @@ enum {
};
#if EV_PROTOTYPES
EV_API_DECL int ev_version_major (void) EV_THROW;
EV_API_DECL int ev_version_minor (void) EV_THROW;
EV_API_DECL int ev_version_major (void) EV_NOEXCEPT;
EV_API_DECL int ev_version_minor (void) EV_NOEXCEPT;
EV_API_DECL unsigned int ev_supported_backends (void) EV_THROW;
EV_API_DECL unsigned int ev_recommended_backends (void) EV_THROW;
EV_API_DECL unsigned int ev_embeddable_backends (void) EV_THROW;
EV_API_DECL unsigned int ev_supported_backends (void) EV_NOEXCEPT;
EV_API_DECL unsigned int ev_recommended_backends (void) EV_NOEXCEPT;
EV_API_DECL unsigned int ev_embeddable_backends (void) EV_NOEXCEPT;
EV_API_DECL ev_tstamp ev_time (void) EV_THROW;
EV_API_DECL void ev_sleep (ev_tstamp delay) EV_THROW; /* sleep for a while */
EV_API_DECL ev_tstamp ev_time (void) EV_NOEXCEPT;
EV_API_DECL void ev_sleep (ev_tstamp delay) EV_NOEXCEPT; /* sleep for a while */
/* Sets the allocation function to use, works like realloc.
* It is used to allocate and free memory.
@ -542,26 +542,26 @@ EV_API_DECL void ev_sleep (ev_tstamp delay) EV_THROW; /* sleep for a while */
* or take some potentially destructive action.
* The default is your system realloc function.
*/
EV_API_DECL void ev_set_allocator (void *(*cb)(void *ptr, long size) EV_THROW) EV_THROW;
EV_API_DECL void ev_set_allocator (void *(*cb)(void *ptr, long size) EV_NOEXCEPT) EV_NOEXCEPT;
/* set the callback function to call on a
* retryable syscall error
* (such as failed select, poll, epoll_wait)
*/
EV_API_DECL void ev_set_syserr_cb (void (*cb)(const char *msg) EV_THROW) EV_THROW;
EV_API_DECL void ev_set_syserr_cb (void (*cb)(const char *msg) EV_NOEXCEPT) EV_NOEXCEPT;
#if EV_MULTIPLICITY
/* the default loop is the only one that handles signals and child watchers */
/* you can call this as often as you like */
EV_API_DECL struct ev_loop *ev_default_loop (unsigned int flags EV_CPP (= 0)) EV_THROW;
EV_API_DECL struct ev_loop *ev_default_loop (unsigned int flags EV_CPP (= 0)) EV_NOEXCEPT;
#ifdef EV_API_STATIC
EV_API_DECL struct ev_loop *ev_default_loop_ptr;
#endif
EV_INLINE struct ev_loop *
ev_default_loop_uc_ (void) EV_THROW
ev_default_loop_uc_ (void) EV_NOEXCEPT
{
extern struct ev_loop *ev_default_loop_ptr;
@ -569,31 +569,31 @@ ev_default_loop_uc_ (void) EV_THROW
}
EV_INLINE int
ev_is_default_loop (EV_P) EV_THROW
ev_is_default_loop (EV_P) EV_NOEXCEPT
{
return EV_A == EV_DEFAULT_UC;
}
/* create and destroy alternative loops that don't handle signals */
EV_API_DECL struct ev_loop *ev_loop_new (unsigned int flags EV_CPP (= 0)) EV_THROW;
EV_API_DECL struct ev_loop *ev_loop_new (unsigned int flags EV_CPP (= 0)) EV_NOEXCEPT;
EV_API_DECL ev_tstamp ev_now (EV_P) EV_THROW; /* time w.r.t. timers and the eventloop, updated after each poll */
EV_API_DECL ev_tstamp ev_now (EV_P) EV_NOEXCEPT; /* time w.r.t. timers and the eventloop, updated after each poll */
#else
EV_API_DECL int ev_default_loop (unsigned int flags EV_CPP (= 0)) EV_THROW; /* returns true when successful */
EV_API_DECL int ev_default_loop (unsigned int flags EV_CPP (= 0)) EV_NOEXCEPT; /* returns true when successful */
EV_API_DECL ev_tstamp ev_rt_now;
EV_INLINE ev_tstamp
ev_now (void) EV_THROW
ev_now (void) EV_NOEXCEPT
{
return ev_rt_now;
}
/* looks weird, but ev_is_default_loop (EV_A) still works if this exists */
EV_INLINE int
ev_is_default_loop (void) EV_THROW
ev_is_default_loop (void) EV_NOEXCEPT
{
return 1;
}
@ -607,17 +607,17 @@ EV_API_DECL void ev_loop_destroy (EV_P);
/* when you want to re-use it in the child */
/* you can call it in either the parent or the child */
/* you can actually call it at any time, anywhere :) */
EV_API_DECL void ev_loop_fork (EV_P) EV_THROW;
EV_API_DECL void ev_loop_fork (EV_P) EV_NOEXCEPT;
EV_API_DECL unsigned int ev_backend (EV_P) EV_THROW; /* backend in use by loop */
EV_API_DECL unsigned int ev_backend (EV_P) EV_NOEXCEPT; /* backend in use by loop */
EV_API_DECL void ev_now_update (EV_P) EV_THROW; /* update event loop time */
EV_API_DECL void ev_now_update (EV_P) EV_NOEXCEPT; /* update event loop time */
#if EV_WALK_ENABLE
/* walk (almost) all watchers in the loop of a given type, invoking the */
/* callback on every such watcher. The callback might stop the watcher, */
/* but do nothing else with the loop */
EV_API_DECL void ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)) EV_THROW;
EV_API_DECL void ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)) EV_NOEXCEPT;
#endif
#endif /* prototypes */
@ -637,46 +637,46 @@ enum {
#if EV_PROTOTYPES
EV_API_DECL int ev_run (EV_P_ int flags EV_CPP (= 0));
EV_API_DECL void ev_break (EV_P_ int how EV_CPP (= EVBREAK_ONE)) EV_THROW; /* break out of the loop */
EV_API_DECL void ev_break (EV_P_ int how EV_CPP (= EVBREAK_ONE)) EV_NOEXCEPT; /* break out of the loop */
/*
* ref/unref can be used to add or remove a refcount on the mainloop. every watcher
* keeps one reference. if you have a long-running watcher you never unregister that
* should not keep ev_loop from running, unref() after starting, and ref() before stopping.
*/
EV_API_DECL void ev_ref (EV_P) EV_THROW;
EV_API_DECL void ev_unref (EV_P) EV_THROW;
EV_API_DECL void ev_ref (EV_P) EV_NOEXCEPT;
EV_API_DECL void ev_unref (EV_P) EV_NOEXCEPT;
/*
* convenience function, wait for a single event, without registering an event watcher
* if timeout is < 0, do wait indefinitely
*/
EV_API_DECL void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) EV_THROW;
EV_API_DECL void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) EV_NOEXCEPT;
# if EV_FEATURE_API
EV_API_DECL unsigned int ev_iteration (EV_P) EV_THROW; /* number of loop iterations */
EV_API_DECL unsigned int ev_depth (EV_P) EV_THROW; /* #ev_loop enters - #ev_loop leaves */
EV_API_DECL void ev_verify (EV_P) EV_THROW; /* abort if loop data corrupted */
EV_API_DECL unsigned int ev_iteration (EV_P) EV_NOEXCEPT; /* number of loop iterations */
EV_API_DECL unsigned int ev_depth (EV_P) EV_NOEXCEPT; /* #ev_loop enters - #ev_loop leaves */
EV_API_DECL void ev_verify (EV_P) EV_NOEXCEPT; /* abort if loop data corrupted */
EV_API_DECL void ev_set_io_collect_interval (EV_P_ ev_tstamp interval) EV_THROW; /* sleep at least this time, default 0 */