Ruslan Osmanov avatar Ruslan Osmanov committed aefc5a4

Del: unused libev files
Updated package metadata

Comments (0)

Files changed (21)

-ev
+Ev
 Ruslan Osmanov

Empty file removed.

LAYOUT

-PHP API LAYOUT
-
-Files
-=====
-
-libev/*			Source code of libev
-php_ev.c		The main implementation of the extension
-php_ev.h		Extension metadata and common includes
-php_ev_embed.h	Embeds libev
-php_ev_fe.c		Function entries and their ARGINFO
-php_ev_fe.h		The extention API function prototypes.
-php_ev_pe.c		Property entries & their read and write handlers
-php_ev_priv.h	Extension's private stuff -- typedefs, marcos, prototypes etc.
-php_ev_macros.h	Macros
-php_ev_types.h	Typedefs
-
-
-Global functions
-================
-
-EvLoop ev_default_loop();
-Returns object representing default loop.
-Attention! This is a factory method, which is described in `Using Factory
-Methods', Advanced_php_programming.George Schlossnagle, p.562
-
-EvLoop ev_loop_new([int $flags = EVLAG_AUTO[, $data = NULL[, double $io_collect_interval = 0.[, double
-$timeout_collect_interval = 0.]]]]);
-Calls the same function as EvLoop::__construct internally. See
-EvLoop::__construct below.
-
-The following functions do just the same as libev's counterparts:
-* void ev_sleep(double $interval);
-* double ev_time();
-* double ev_now();
-* void ev_verify(EvLoop $loop);
-* void ev_now_update(EvLoop $loop);
-* void ev_suspend(EvLoop $loop);
-* void ev_run(EvLoop $loop[, int $flags = 0])
-* void ev_break(EvLoop $loop[, int $how = EVBREAK_ONE]);
-* void ev_ref(EvLoop $loop);
-* void ev_unref(EvLoop $loop);
-* string ev_version_major();
-* string ev_version_minor();
-* int ev_supported_backends();
-* int ev_recommended_backends();
-* int ev_embeddable_backends();
-* void ev_feed_signal(int $signum);
-* void ev_invoke_pending(EvLoop $loop);
-* int ev_backend(EvLoop $loop);
-* int ev_pending_count(EvLoop $loop);
-* int ev_depth(EvLoop $loop);
-* int ev_is_default_loop(EvLoop $loop);
-* int ev_iteration(EvLoop $loop);
-
-Watcher functions:
-* void ev_watcher_start(EvWatcher $w);
-* void ev_watcher_stop(EvWatcher $w);
-	are mapped to EvWatcher::start() and EvWatcher::stop() methods
-* bool ev_watcher_is_active(EvWatcher $w);
-	is mapped to EvWatcher::$is_active property
-* bool ev_watcher_is_pending(EvWatcher $w);
-	is mapped to EvWatcher::$is_pending property
-* mixed ev_watcher_get_data(EvWatcher $w);
-* void ev_watcher_set_data(EvWatcher $w, mixed $data);
-	do the same as get- and set- internal functions restrieving EvWatcher::$data
-	property value.
-* void ev_watcher_invoke(EvWatcher $w, int revents)
-	Does the same as EvWatcher::invoke()
-* int ev_watcher_clear_pending();
-	Does the same as EvWatcher::clear()
-* void ev_watcher_feed_event(EvWatcher $w, int revents);
-	Does the same as EvWatcher::feed()
-* callback ev_watcher_get_callback(EvWatcher $w);
-* void ev_watcher_set_callback(EvWatcher $w, callback $callback);
-	are mapped to EvWatcher::$callback property
-* int ev_watcher_get_priority(EvWatcher $w); 
-* void ev_watcher_set_priority(EvWatcher $w, int $priority);
-	are mapped to EvWatcher::$priority property
-
-
-* EvIO ev_watcher_io(resource $fd, int $events, callback $callback[, mixed $data =
-NULL[, int $priority = 0]])
-	Mapped to EvIO::__construct()
-* void ev_watcher_io_set(resource $fd, int events);
-	Mapped to EvIO::set()
-* resource ev_watcher_io_fd_get(EvIO $w);
-	mapped to EvIO::$fd property
-* int ev_watcher_io_events_get(EvIO $w);
-	mapped to EvIO::$events property
-
-* EvTimer ev_watcher_timer(double $after, double $repeat, EvLoop $loop, callback
-$callback [, $data = NULL[, int $priority = 0]]);
-	Mapped to EvTimer::__construct()
-* void ev_watcher_timer_set(double $after, double $repeat);
-	Mapped to EvTimer::set()
-* void ev_watcher_timer_again(EvTimer $w);
-	Mapped to EvTimer::again()
-* double ev_watcher_timer_remaining(EvTimer $w);
-	Mapped to EvTimer::remaining()
-
-* EvPeriodic ev_watcher_periodic(double $offset, double $interval, EvLoop $loop[, mixed
-$data[, int $priority = 0]]);
-	Mapped to EvPeriodic::__construct()
-* void ev_watcher_periodic_set(EvPeriodic $w, double $offset, double $interval);
-	Mapped to EvPeriodic::set()
-* void ev_watcher_periodic_again(EvPeriodic $w);
-* double ev_watcher_periodic_at(EvPeriodic $w);
-
-
-* EvScheduler ev_watcher_schedule(callback $scheduler, EvLoop $loop, callback $callback[, mixed
-$data = NULL[, int $priority = 0]]);
-	Mapped to EvScheduler::__construct()
-* void ev_watcher_scheduler_set(EvScheduler $w, double $offset, double $interval);
-	Mapped to EvScheduler::set()
-* void ev_watcher_scheduler_again(EvScheduler $w);
-* double ev_watcher_scheduler(EvScheduler $w);
-
-
-* EvSignal ev_watcher_signal(int $signum, EvLoop $loop, callback $callback[, mixed $data = NULL[,
-	Mapped to EvSignal::__construct()
-* void ev_watcher_signal_set(EvSignal $w, int $signum);
-	Mapped to EvSignal::set()
-* ev_watcher_signal_set(EvSignal $w, int $signum);
-* ev_watcher_signal_get(EvSignal $w);
-	Mapped to EvSignal::$signum property
-
-...........
-
-Classes
-=======
-
-* EvLoop
-* EvException
-
-Watcher classes:
-
-* EvWatcher - base class for the rest of watcher classes
-* EvTimer
-* EvIO
-* EvTimer
-* EvPeriodic
-* EvScheduler
-* EvSignal
-* EvChild
-* EvStat
-* EvIdle
-* EvPrepare
-* EvCheck
-* EvEmbed
-* EvFork
-* EvAsync
-
-
-EvLoop
-======
-
-
-EvLoop Properties:
-------------------
-
-public $data = NULL;
-Internal property get- and set- functions call 
-ev_set_userdata(loop, data) and ev_userdata(loop).
-Is set in EvLoop::__construct as well.
-
-protected int $backend;
-is mapped from ev_backend();
-
-protected int $pending;
-is mapped from ev_pending_count();
-
-protected int $depth;
-is mapped from ev_depth();
-
-protected int $is_default_loop;
-is mapped from ev_is_default_loop();
-
-protected int $iteration; 
-is mapped from ev_iteration();
-
-EvLoop Methods:
----------------
-(DONE) __construct([int $flags = EVLAG_AUTO[, $callback = NULL[, $data = NULL[, double $io_collect_interval = 0.[, double
-$timeout_collect_interval = 0.]]]]]);
-- $data is a variable attached to the event loop object.
-- When $io_collect_interval, or $timeout_collect_interval are greater than zero,
-	ev_io_collect_interval(), or ev_timeout_collect_interval() libev functions
-	will be called internally.
-- If omitted or NULL, the loop will fall back to its default behaviour of calling
-	ev_invoke_pending() when required. If it is a callable, then the loop will
-	execute it instead, and it becomes the user's responsibility to call
-	EvLoop::invoke_pending(), or ev_invoke_pending() to invoke pending events.
-	The callback must match the following prototype:
-		void callback(EvLoop $loop);
-
-
-EvLoop ev_default_loop([int $flags = EVLAG_AUTO]);
-is mapped from ev_default_loop
-
-(DONE) void loop_fork();
-
-(DONE) void verify();
-is mapped from ev_verify();
-
-(DONE) void invoke_pending();
-
-(DONE) void now_update();
-(DONE) void suspend();
-(DONE) void resume();
-
-(DONE) int supported_backends();
-(DONE) int recommended_backends();
-(DONE) int embeddable_backends();
-are mapped from their ev_* counterparts.
-
-(DONE) void sleep(double $seconds);
-calls ev_sleep().
-
-(DONE) double time();
-(DONE) double now();
-
-(DONE) void run([int $flags = 0]);
-(DONE) void break([int $flags = 0]);
-(DONE) void feed_signal(int $signum);
-are mapped from their ev_*() counterparts.
-(DONE) void feed_signal_event(int $signum);
-
-
-EvWatcher
-=========
-
-EvWatcher is the base class for all watcher classes.
-
-EvWatcher Properties 
---------------------
-
-(DONE) protected bool $is_active;
-mapped from ev_watcher_is_active;
-
-(DONE) protected bool $is_pending;
-mapped from ev_watcher_is_pending;
-
-(DONE) public int $priority;
-Calls ev_priority() and ev_set_priority() internally to get and set the watcher
-priority. Mapped from ev_watcher_get_priority() and ev_watcher_set_priority().
-
-public callback $callback;
-calls ev_cb() internally. Mapped from ev_watcher_callback.
-callback must match the following prorotype: 
-	void function callback(EvWatcher $w, int revents);
-	$w should be a subclass of EvWatcher
-
-public mixed $data;
-Internal get- and set- functions retrieve corresponding field of custom watcher
-structure. See
-http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#ASSOCIATING_CUSTOM_DATA_WITH_A_WATCH
-
-
-EvWatcher Methods
------------------
-
-void start(void);
-mapped from ev_watcher_start
-
-void stop(void);
-mapped from ev_watcher_stop
-
-void invoke(int $revents);
-Invoke the watcher callback with the given revents. Calls ev_invoke()
-internally. 
-
-int clear(int revents);
-Calls ev_clear_pending() internally.
-
-void feed(int revents);
-Calls ev_feed_event() internally. 
-
-
-EvIO
-====
-
-EvIO is a class derived from EvWatcher. Represents libev's IO watcher.
-
-Properties:
-
-protected resource $fd;
-protected int $events;
-
-
-Methods:
-
-public __construct(resource $fd, int $events, callback $callback[, mixed $data =
-NULL[, int $priority = 0]]);
-
-public set(resource $fd, events);
-Reconfigures the watcher, see the constructor above for details. Can be called
-at any time.
-
-
-EvTimer
-=======
-
-Methods: 
-
-EvTimer __construct(double $after, double $repeat, EvLoop $loop, callback
-$callback [, $data = NULL[, int $priority = 0]]);
-
-void set(double $after, double $repeat);
-Reconfigures the watcher, see the constructor above for details. Can be called
-at any time.
-
-void again();
-Calls ev_timer_again() internally
-
-double remaining();
-Calls ev_timer_remaining() internally 
-
-
-EvPeriodic
-==========
-
-Properties:
-
-Methods: 
-
-EvPeriodic __construct(double $offset, double $interval, EvLoop $loop[, mixed
-$data[, int $priority = 0]]);
-
-set(double $offset, double $interval);
-Reconfigures the watcher, see the constructor above for details. Can be called at
-any time.
-
-void again();
-Calls ev_periodic_again() internally.
-
-double at();
-Calls ev_periodic_at() internally.
-
-
-EvScheduler
-===========
-
-EvScheduler is a special type of EvPeriodic watchers. It allows to reschedule
-time the watcher will be scheduled next time via callback.
-
-Methods: 
-
-__construct(callback $scheduler, EvLoop $loop, callback $callback[, mixed
-$data = NULL[, int $priority = 0]]);
-$scheduler - rescheduler callback. Must match the following proto:
-	function scheduler(EvScheduler $watcher, double $now);
-
-
-set(double $offset, double $interval);
-Reconfigures the watcher, see the constructor above for details. Can be called at
-any time.
-
-void again();
-Mapped to EvPeriodic::again()
-
-double at();
-Mapped to EvPeriodic::at()
-
-
-EvSignal
-========
-
-Properties:
-
-public int $signum;
-
-Methods: 
-
-EvSignal __construct(int $signum, EvLoop $loop, callback $callback[, mixed $data = NULL[,
-$priority = 0]]);
-
-void set(int $signum);
-calls ev_signal_set() internally
-
-
-EvChild
-=======
-
-Properties: 
-
-protected int $pid; 
-protected int $rpid; 
-protected int $rstatus; 
-
-Methods:
-
-EvChild::__construct(int $pid, bool $trace, EvLoop $loop, callback $callback[,
-mixed $data = NULL[, int priority = 0]]);
-
-voi set(int $pid, bool $trace);
-Reconfigures the watcher, see the constructor above for details. Can be called
-at any time.
-
-
-EvStat
-======
-
-Properties: 
-
-protected string $path;
-protected int $interval;
-
-Methods:
-
-__construct(string $path, double $interval, EvLoop $loop, callback $callback[,
-mixed $data = NULL[, int $priority = 0]]);
-
-void set($string $path, double $interval);
-Reconfigures the watcher, see the constructor above for details. Can be called
-at any time.
-
-
-.................
-
-
-
-
-vim: ts=4 sts=4 sw=4 tw=80

libev/CVS/Entries

-/LICENSE/1.10/Mon Apr  2 20:52:32 2012//
-/Makefile.am/1.9/Wed Dec 21 18:16:08 2011//
-/README/1.21/Fri Mar 30 17:43:55 2012//
-/README.embed/1.29/Sat Nov 24 10:10:26 2007//
-/Symbols.ev/1.14/Tue Jan 11 13:45:28 2011//
-/Symbols.event/1.4/Tue May  8 15:52:13 2012//
-/autogen.sh/1.3/Mon May 30 15:28:54 2011//
-/configure.ac/1.34/Sat Feb  4 19:09:29 2012//
-/ev++.h/1.61/Sun Jun 24 14:30:40 2012//
-/ev.3/1.95/Sat May 26 08:52:09 2012//
-/ev.h/1.169/Wed Apr 18 06:09:29 2012//
-/ev.pod/1.421/Thu Aug  2 11:55:28 2012//
-/ev_epoll.c/1.67/Wed Jun 20 12:39:53 2012//
-/ev_kqueue.c/1.54/Mon Apr  2 18:39:54 2012//
-/ev_poll.c/1.39/Sat Jun  4 05:33:29 2011//
-/ev_port.c/1.28/Sat Jun  4 05:33:29 2011//
-/ev_select.c/1.55/Sat Jun  4 05:33:29 2011//
-/ev_vars.h/1.53/Tue Jul 24 16:28:08 2012//
-/ev_win32.c/1.15/Sun Feb 19 02:03:11 2012//
-/ev_wrap.h/1.37/Sun May  6 13:09:35 2012//
-/event.c/1.52/Mon Apr  2 23:14:41 2012//
-/event.h/1.26/Mon Apr  2 23:15:27 2012//
-/event_compat.h/1.8/Wed Feb 16 08:02:51 2011//
-/import_libevent/1.29/Tue Apr 15 04:34:07 2008//
-/libev.m4/1.15/Sun Feb 20 02:56:23 2011//
-/update_ev_c/1.2/Wed Jan 18 12:13:14 2012//
-/update_ev_wrap/1.6/Sun May  6 13:09:29 2012//
-/update_symbols/1.1/Wed Dec 19 01:59:29 2007//
-/Changes/1.281/Sun Oct 28 13:49:58 2012//
-/ev.c/1.450/Sun Oct 28 13:50:00 2012//
-D

libev/CVS/Repository

-libev

libev/CVS/Root

-:pserver:anonymous@cvs.schmorp.de/schmorpforge

libev/Changes

-Revision history for libev, a high-performance and full-featured event loop.
-
-TODO: ev_loop_wakeup
-TODO: EV_STANDALONE == NO_HASSEL (do not use clock_gettime in ev_standalone)
-TODO: faq, process a thing in each iteration
-TODO: dbeugging tips, ev_verify, ev_init twice
-TODO: ev_break for immediate exit (EVBREAK_NOW?)
-TODO: ev_feed_child_event
-
-TODO: document the special problem of signals around fork.
-TODO: store pid for each signal
-TODO: document file descriptor usage per loop
-TODO: store loop pid_t and compare isndie signal handler,store 1 for same, 2 for differign pid, clean up in loop_fork
-TODO: embed watchers need updating when fd changes
-TODO: document portbaility requirements for atomic pointer access
-        - destroying a non-default loop would stop the global waitpid
-          watcher (Denis Bilenko).
-	- queueing pending watchers of higher priority from a watcher now invokes
-          them in a timely fashion (reported by Denis Bilenko).
-	- add throw() to all libev functions that cannot throw exceptions, for
-          further code size decrease when compiling for C++.
-        - add throw () to callbacks that must not throw exceptions (allocator,
-          syserr, loop acquire/release, periodic reschedule cbs).
-	- fix event_base_loop return code, add event_get_callback, event_base_new,
-          event_base_get_method calls to improve libevent 1.x emulation and add
-          some libevent 2.x functionality (based on a patch by Jeff Davey).
-        - add more memory fences to fix a bug reported by Jeff Davey. Better
-          be overfenced than underprotected.
-	- ev_run now returns a boolean status (true meaning watchers are
-          still active).
-	- ev_once: undef EV_ERROR in ev_kqueue.c, to avoid clashing with
-          libev's EV_ERROR (reported by 191919).
-	- (ecb) add memory fence support for xlC (Darin McBride).
-	- (ecb) add memory fence support for gcc-mips (Anton Kirilov).
-	- (ecb) add memory fence support for gcc-alpha (Christian Weisgerber).
-        - work around some kernels losing file descriptors by leaking
-          the kqueue descriptor in the child.
-        - include sys/syscall.h instead of plain syscall.h.
-        - check for io watcher loops in ev_verify, check for the most
-          common reported usage bug in ev_io_start.
-        - chose socket vs. WSASocket at compiletime using EV_USE_WSASOCKET.
-        - always use WSASend/WSARecv directly on windows, hoping that this
-          works in all cases (unlike read/write/send/recv...).
-        - try to detect signals around a fork faster (test program by
-          Denis Bilenko).
-        - work around recent glibc versions that leak memory in realloc.
-        - rename ev::embed::set to ev::embed::set_embed to avoid clashing
-          the watcher base set (loop) method.
-        - rewrite the async/signal pipe logic to always keep a valid fd, which
-          simplifies (and hopefuly correctifies :) the race checking
-          on fork, at the cost of one extra fd.
-
-4.11 Sat Feb  4 19:52:39 CET 2012
-	- INCOMPATIBLE CHANGE: ev_timer_again now clears the pending status, as
-          was documented already, but not implemented in the repeating case.
-        - new compiletime symbols: EV_NO_SMP and EV_NO_THREADS.
-	- fix a race where the workaround against the epoll fork bugs
-          caused signals to not be handled anymore.
-	- correct backend_fudge for most backends, and implement a windows
-          specific workaround to avoid looping because we call both
-          select and Sleep, both with different time resolutions.
-        - document range and guarantees of ev_sleep.
-        - document reasonable ranges for periodics interval and offset.
-        - rename backend_fudge to backend_mintime to avoid future confusion :)
-	- change the default periodic reschedule function to hopefully be more
-          exact and correct even in corner cases or in the far future.
-        - do not rely on -lm anymore: use it when available but use our
-          own floor () if it is missing. This should make it easier to embed,
-          as no external libraries are required.
-        - strategically import macros from libecb and mark rarely-used functions
-          as cache-cold (saving almost 2k code size on typical amd64 setups).
-        - add Symbols.ev and Symbols.event files, that were missing.
-        - fix backend_mintime value for epoll (was 1/1024, is 1/1000 now).
-        - fix #3 "be smart about timeouts" to not "deadlock" when
-          timeout == now, also improve the section overall.
-        - avoid "AVOIDING FINISHING BEFORE RETURNING" idiom.
-        - support new EV_API_STATIC mode to make all libev symbols
-          static.
-        - supply default CFLAGS of -g -O3 with gcc when original CFLAGS
-          were empty.
-
-4.04 Wed Feb 16 09:01:51 CET 2011
-	- fix two problems in the native win32 backend, where reuse of fd's
-          with different underlying handles caused handles not to be removed
-          or added to the select set (analyzed and tested by Bert Belder).
-	- do no rely on ceil() in ev_e?poll.c.
-        - backport libev to HP-UX versions before 11 v3.
-        - configure did not detect nanosleep and clock_gettime properly when
-          they are available in the libc (as opposed to -lrt).
-
-4.03 Tue Jan 11 14:37:25 CET 2011
-	- officially support polling files with all backends.
-	- support files, /dev/zero etc. the same way as select in the epoll
-          backend, by generating events on our own.
-        - ports backend: work around solaris bug 6874410 and many related ones
-          (EINTR, maybe more), with no performance loss (note that the solaris
-          bug report is actually wrong, reality is far more bizarre and broken
-          than that).
-	- define EV_READ/EV_WRITE as macros in event.h, as some programs use
-          #ifdef to test for them.
-        - new (experimental) function: ev_feed_signal.
-        - new (to become default) EVFLAG_NOSIGMASK flag.
-        - new EVBACKEND_MASK symbol.
-        - updated COMMON IDIOMS SECTION.
-
-4.01 Fri Nov  5 21:51:29 CET 2010
-        - automake fucked it up, apparently, --add-missing -f is not quite enough
-          to make it update its files, so 4.00 didn't install ev++.h and
-          event.h on make install. grrr.
-        - ev_loop(count|depth) didn't return anything (Robin Haberkorn).
-        - change EV_UNDEF to 0xffffffff to silence some overzealous compilers.
-        - use "(libev) " prefix for all libev error messages now.
-
-4.00 Mon Oct 25 12:32:12 CEST 2010
-	- "PORTING FROM LIBEV 3.X TO 4.X" (in ev.pod) is recommended reading.
-	- ev_embed_stop did not correctly stop the watcher (very good
-          testcase by Vladimir Timofeev).
-        - ev_run will now always update the current loop time - it erroneously
-          didn't when idle watchers were active, causing timers not to fire.
-        - fix a bug where a timeout of zero caused the timer not to fire
-          in the libevent emulation (testcase by Péter Szabó).
-	- applied win32 fixes by Michael Lenaghan (also James Mansion).
-	- replace EV_MINIMAL by EV_FEATURES.
-        - prefer EPOLL_CTL_ADD over EPOLL_CTL_MOD in some more cases, as it
-          seems the former is *much* faster than the latter.
-        - linux kernel version detection (for inotify bug workarounds)
-          did not work properly.
-        - reduce the number of spurious wake-ups with the ports backend.
-        - remove dependency on sys/queue.h on freebsd (patch by Vanilla Hsu).
-        - do async init within ev_async_start, not ev_async_set, which avoids
-          an API quirk where the set function must be called in the C++ API
-          even when there is nothing to set.
-        - add (undocumented) EV_ENABLE when adding events with kqueue,
-          this might help with OS X, which seems to need it despite documenting
-          not to need it (helpfully pointed out by Tilghman Lesher).
-        - do not use poll by default on freebsd, it's broken (what isn't
-          on freebsd...).
-        - allow to embed epoll on kernels >= 2.6.32.
-        - configure now prepends -O3, not appends it, so one can still
-          override it.
-        - ev.pod: greatly expanded the portability section, added a porting
-          section, a description of watcher states and made lots of minor fixes.
-        - disable poll backend on AIX, the poll header spams the namespace
-          and it's not worth working around dead platforms (reported
-          and analyzed by Aivars Kalvans).
-        - improve header file compatibility of the standalone eventfd code
-          in an obscure case.
-        - implement EV_AVOID_STDIO option.
-        - do not use sscanf to parse linux version number (smaller, faster,
-          no sscanf dependency).
-        - new EV_CHILD_ENABLE and EV_SIGNAL_ENABLE configurable settings.
-        - update libev.m4 HAVE_CLOCK_SYSCALL test for newer glibcs.
-        - add section on accept() problems to the manpage.
-        - rename EV_TIMEOUT to EV_TIMER.
-        - rename ev_loop_count/depth/verify/loop/unloop.
-        - remove ev_default_destroy and ev_default_fork.
-        - switch to two-digit minor version.
-        - work around an apparent gentoo compiler bug.
-        - define _DARWIN_UNLIMITED_SELECT. just so.
-        - use enum instead of #define for most constants.
-        - improve compatibility to older C++ compilers.
-        - (experimental) ev_run/ev_default_loop/ev_break/ev_loop_new have now
-          default arguments when compiled as C++.
-        - enable automake dependency tracking.
-        - ev_loop_new no longer leaks memory when loop creation failed.
-        - new ev_cleanup watcher type.
-
-3.9  Thu Dec 31 07:59:59 CET 2009
-	- signalfd is no longer used by default and has to be requested
-          explicitly - this means that easy to catch bugs become hard to
-          catch race conditions, but the users have spoken.
-        - point out the unspecified signal mask in the documentation, and
-          that this is a race condition regardless of EV_SIGNALFD.
-	- backport inotify code to C89.
-        - inotify file descriptors could leak into child processes.
-        - ev_stat watchers could keep an erroneous extra ref on the loop,
-          preventing exit when unregistering all watchers (testcases
-          provided by ry@tinyclouds.org).
-        - implement EV_WIN32_HANDLE_TO_FD and EV_WIN32_CLOSE_FD configuration
-          symbols to make it easier for apps to do their own fd management.
-        - support EV_IDLE_ENABLE being disabled in ev++.h
-          (patch by Didier Spezia).
-        - take advantage of inotify_init1, if available, to set cloexec/nonblock
-          on fd creation, to avoid races.
-        - the signal handling pipe wasn't always initialised under windows
-          (analysed by lekma).
-        - changed minimum glibc requirement from glibc 2.9 to 2.7, for
-          signalfd.
-        - add missing string.h include (Denis F. Latypoff).
-        - only replace ev_stat.prev when we detect an actual difference,
-          so prev is (almost) always different to attr. this might
-          have caused the problems with 04_stat.t.
-        - add ev::timer->remaining () method to C++ API.
-
-3.8  Sun Aug  9 14:30:45 CEST 2009
-	- incompatible change: do not necessarily reset signal handler
-          to SIG_DFL when a sighandler is stopped.
-        - ev_default_destroy did not properly free or zero some members,
-          potentially causing crashes and memory corruption on repeated
-          ev_default_destroy/ev_default_loop calls.
-	- take advantage of signalfd on GNU/Linux systems.
-	- document that the signal mask might be in an unspecified
-          state when using libev's signal handling.
-        - take advantage of some GNU/Linux calls to set cloexec/nonblock
-          on fd creation, to avoid race conditions.
-
-3.7  Fri Jul 17 16:36:32 CEST 2009
-	- ev_unloop and ev_loop wrongly used a global variable to exit loops,
-          instead of using a per-loop variable (bug caught by accident...).
-	- the ev_set_io_collect_interval interpretation has changed.
-        - add new functionality: ev_set_userdata, ev_userdata,
-          ev_set_invoke_pending_cb, ev_set_loop_release_cb,
-          ev_invoke_pending, ev_pending_count, together with a long example
-          about thread locking.
-        - add ev_timer_remaining (as requested by Denis F. Latypoff).
-        - add ev_loop_depth.
-        - calling ev_unloop in fork/prepare watchers will no longer poll
-          for new events.
-	- Denis F. Latypoff corrected many typos in example code snippets.
-        - honor autoconf detection of EV_USE_CLOCK_SYSCALL, also double-
-          check that the syscall number is available before trying to
-          use it (reported by ry@tinyclouds).
-        - use GetSystemTimeAsFileTime instead of _timeb on windows, for
-          slightly higher accuracy.
-        - properly declare ev_loop_verify and ev_now_update even when
-          !EV_MULTIPLICITY.
-        - do not compile in any priority code when EV_MAXPRI == EV_MINPRI.
-        - support EV_MINIMAL==2 for a reduced API.
-        - actually 0-initialise struct sigaction when installing signals.
-        - add section on hibernate and stopped processes to ev_timer docs.
-
-3.6  Tue Apr 28 02:49:30 CEST 2009
-	- multiple timers becoming ready within an event loop iteration
-          will be invoked in the "correct" order now.
-	- do not leave the event loop early just because we have no active
-          watchers, fixing a problem when embedding a kqueue loop
-          that has active kernel events but no registered watchers
-          (reported by blacksand blacksand).
-	- correctly zero the idx values for arrays, so destroying and
-          reinitialising the default loop actually works (patch by
-          Malek Hadj-Ali).
-        - implement ev_suspend and ev_resume.
-        - new EV_CUSTOM revents flag for use by applications.
-        - add documentation section about priorities.
-        - add a glossary to the dcoumentation.
-        - extend the ev_fork description slightly.
-        - optimize a jump out of call_pending.
-
-3.53 Sun Feb 15 02:38:20 CET 2009
-	- fix a bug in event pipe creation on win32 that would cause a
-          failed assertion on event loop creation (patch by Malek Hadj-Ali).
-	- probe for CLOCK_REALTIME support at runtime as well and fall
-          back to gettimeofday if there is an error, to support older
-          operating systems with newer header files/libraries.
-        - prefer gettimeofday over clock_gettime with USE_CLOCK_SYSCALL
-          (default most everywhere), otherwise not.
-
-3.52 Wed Jan  7 21:43:02 CET 2009
-	- fix compilation of select backend in fd_set mode when NFDBITS is
-          missing (to get it to compile on QNX, reported by Rodrigo Campos).
-        - better select-nfds handling when select backend is in fd_set mode.
-        - diagnose fd_set overruns when select backend is in fd_set mode.
-        - due to a thinko, instead of disabling everything but
-          select on the borked OS X platform, everything but select was
-          allowed (reported by Emanuele Giaquinta).
-        - actually verify that local and remote port are matching in
-          libev's socketpair emulation, which makes denial-of-service
-          attacks harder (but not impossible - it's windows). Make sure
-          it even works under vista, which thinks that getpeer/sockname
-          should return fantasy port numbers.
-        - include "libev" in all assertion messages for potentially
-          clearer diagnostics.
-        - event_get_version (libevent compatibility) returned
-          a useless string instead of the expected version string
-          (patch by W.C.A. Wijngaards).
-
-3.51 Wed Dec 24 23:00:11 CET 2008
-        - fix a bug where an inotify watcher was added twice, causing
-          freezes on hash collisions (reported and analysed by Graham Leggett).
-	- new config symbol, EV_USE_CLOCK_SYSCALL, to make libev use
-          a direct syscall - slower, but no dependency on librt et al.
-        - assume negative return values != -1 signals success of port_getn
-          (http://cvs.epicsol.org/cgi/viewcvs.cgi/epic5/source/newio.c?rev=1.52)
-          (no known failure reports, but it doesn't hurt).
-        - fork detection in ev_embed now stops and restarts the watcher
-          automatically.
-        - EXPERIMENTAL: default the method to operator () in ev++.h,
-          to make it nicer to use functors (requested by Benedek László).
-        - fixed const object callbacks in ev++.h.
-        - replaced loop_ref argument of watcher.set (loop) by a direct
-          ev_loop * in ev++.h, to avoid clashes with functor patch.
-        - do not try to watch the empty string via inotify.
-        - inotify watchers could be leaked under certain circumstances.
-        - OS X 10.5 is actually even more broken than earlier versions,
-          so fall back to select on that piece of garbage.
-        - fixed some weirdness in the ev_embed documentation.
-
-3.49 Wed Nov 19 11:26:53 CET 2008
-	- ev_stat watchers will now use inotify as a mere hint on
-          kernels <2.6.25, or if the filesystem is not in the
-          "known to be good" list.
-        - better mingw32 compatibility (it's not as borked as native win32)
-          (analysed by Roger Pack).
-        - include stdio.h in the example program, as too many people are
-          confused by the weird C language otherwise. I guess the next thing
-          I get told is that the "..." ellipses in the examples don't compile
-          with their C compiler.
-
-3.48 Thu Oct 30 09:02:37 CET 2008
-	- further optimise away the EPOLL_CTL_ADD/MOD combo in the epoll
-          backend by assuming the kernel event mask hasn't changed if
-          ADD fails with EEXIST.
-        - work around spurious event notification bugs in epoll by using
-          a 32-bit generation counter. recreate kernel state if we receive
-          spurious notifications or unwanted events. this is very costly,
-          but I didn't come up with this horrible design.
-        - use memset to initialise most arrays now and do away with the
-          init functions.
-        - expand time-out strategies into a "Be smart about timeouts" section.
-        - drop the "struct" from all ev_watcher declarations in the
-          documentation and did other clarifications (yeah, it was a mistake
-          to have a struct AND a function called ev_loop).
-	- fix a bug where ev_default would not initialise the default
-          loop again after it was destroyed with ev_default_destroy.
-        - rename syserr to ev_syserr to avoid name clashes when embedding,
-          do similar changes for event.c.
-
-3.45 Tue Oct 21 21:59:26 CEST 2008
-	- disable inotify usage on linux <2.6.25, as it is broken
-          (reported by Yoann Vandoorselaere).
-        - ev_stat erroneously would try to add inotify watchers
-          even when inotify wasn't available (this should only
-          have a performance impact).
-	- ev_once now passes both timeout and io to the callback if both
-          occur concurrently, instead of giving timeouts precedence.
-	- disable EV_USE_INOTIFY when sys/inotify.h is too old.
-
-3.44 Mon Sep 29 05:18:39 CEST 2008
-	- embed watchers now automatically invoke ev_loop_fork on the
-          embedded loop when the parent loop forks.
-	- new function: ev_now_update (loop).
-	- verify_watcher was not marked static.
-        - improve the "associating..." manpage section.
-        - documentation tweaks here and there.
-
-3.43 Sun Jul  6 05:34:41 CEST 2008
-	- include more include files on windows to get struct _stati64
-          (reported by Chris Hulbert, but doesn't quite fix his issue).
-	- add missing #include <io.h> in ev.c on windows (reported by
-          Matt Tolton).
-
-3.42 Tue Jun 17 12:12:07 CEST 2008
-	- work around yet another windows bug: FD_SET actually adds fd's
-          multiple times to the fd_*SET*, despite official MSN docs claiming
-          otherwise. Reported and well-analysed by Matt Tolton.
-	- define NFDBITS to 0 when EV_SELECT_IS_WINSOCKET to make it compile
-          (reported any analysed by Chris Hulbert).
-        - fix a bug in ev_ebadf (this function is only used to catch
-          programming errors in the libev user). reported by Matt Tolton.
-        - fix a bug in fd_intern on win32 (could lead to compile errors
-          under some circumstances, but would work correctly if it compiles).
-          reported by Matt Tolton.
-        - (try to) work around missing lstat on windows.
-	- pass in the write fd set as except fd set under windows. windows
-          is so uncontrollably lame that it requires this. this means that
-          switching off oobinline is not supported (but tcp/ip doesn't
-          have oob, so that would be stupid anyways.
-        - use posix module symbol to auto-detect monotonic clock presence
-          and some other default values.
-
-3.41 Fri May 23 18:42:54 CEST 2008
-	- work around an obscure bug in winsocket select: if you
-          provide only empty fd sets then select returns WSAEINVAL. how sucky.
-        - improve timer scheduling stability and reduce use of time_epsilon.
-        - use 1-based 2-heap for EV_MINIMAL, simplifies code, reduces
-          codesize and makes for better cache-efficiency.
-        - use 3-based 4-heap for !EV_MINIMAL. this makes better use
-          of cpu cache lines and gives better growth behaviour than
-          2-based heaps.
-        - cache timestamp within heap for !EV_MINIMAL, to avoid random
-          memory accesses.
-        - document/add EV_USE_4HEAP and EV_HEAP_CACHE_AT.
-        - fix a potential aliasing issue in ev_timer_again.
-        - add/document ev_periodic_at, retract direct access to ->at.
-        - improve ev_stat docs.
-        - add portability requirements section.
-	- fix manpage headers etc.
-        - normalise WSA error codes to lower range on windows.
-        - add consistency check code that can be called automatically
-          or on demand to check for internal structures (ev_loop_verify).
-
-3.31 Wed Apr 16 20:45:04 CEST 2008
-	- added last minute fix for ev_poll.c by Brandon Black.
-
-3.3  Wed Apr 16 19:04:10 CEST 2008
-        - event_base_loopexit should return 0 on success
-          (W.C.A. Wijngaards).
-	- added linux eventfd support.
-        - try to autodetect epoll and inotify support
-          by libc header version if not using autoconf.
-        - new symbols: EV_DEFAULT_UC and EV_DEFAULT_UC_.
-        - declare functions defined in ev.h as inline if
-          C99 or gcc are available.
-        - enable inlining with gcc versions 2 and 3.
-        - work around broken poll implementations potentially
-          not clearing revents field in ev_poll (Brandon Black)
-          (no such systems are known at this time).
-        - work around a bug in realloc on openbsd and darwin,
-          also makes the erroneous valgrind complaints
-          go away (noted by various people).
-        - fix ev_async_pending, add c++ wrapper for ev_async
-          (based on patch sent by Johannes Deisenhofer).
-        - add sensible set method to ev::embed.
-        - made integer constants type int in ev.h.
-
-3.2  Wed Apr  2 17:11:19 CEST 2008
-	- fix a 64 bit overflow issue in the select backend,
-          by using fd_mask instead of int for the mask.
-        - rename internal sighandler to avoid clash with very old perls.
-        - entering ev_loop will not clear the ONESHOT or NONBLOCKING
-          flags of any outer loops anymore.
-        - add ev_async_pending.
-
-3.1  Thu Mar 13 13:45:22 CET 2008
-	- implement ev_async watchers.
-        - only initialise signal pipe on demand.
-	- make use of sig_atomic_t configurable.
-        - improved documentation.
-
-3.0  Mon Jan 28 13:14:47 CET 2008
-	- API/ABI bump to version 3.0.
-	- ev++.h includes "ev.h" by default now, not <ev.h>.
-	- slightly improved documentation.
-	- speed up signal detection after a fork.
-        - only optionally return trace status changed in ev_child
-          watchers.
-        - experimental (and undocumented) loop wrappers for ev++.h.
-
-2.01 Tue Dec 25 08:04:41 CET 2007
-	- separate Changes file.
-	- fix ev_path_set => ev_stat_set typo.
-        - remove event_compat.h from the libev tarball.
-        - change how include files are found.
-        - doc updates.
-        - update licenses, explicitly allow for GPL relicensing.
-
-2.0  Sat Dec 22 17:47:03 CET 2007
-        - new ev_sleep, ev_set_(io|timeout)_collect_interval.
-        - removed epoll from embeddable fd set.
-        - fix embed watchers.
-	- renamed ev_embed.loop to other.
-	- added exported Symbol tables.
-        - undefine member wrapper macros at the end of ev.c.
-        - respect EV_H in ev++.h.
-
-1.86 Tue Dec 18 02:36:57 CET 2007
-	- fix memleak on loop destroy (not relevant for perl).
-
-1.85 Fri Dec 14 20:32:40 CET 2007
-        - fix some aliasing issues w.r.t. timers and periodics
-          (not relevant for perl).
-
-(for historic versions refer to EV/Changes, found in the Perl interface)
-
-0.1  Wed Oct 31 21:31:48 CET 2007
-	- original version; hacked together in <24h.
-

libev/README.embed

-This file is now included in the main libev documentation, see
-
-   http://cvs.schmorp.de/libev/ev.html

libev/Symbols.ev

-ev_async_send
-ev_async_start
-ev_async_stop
-ev_backend
-ev_break
-ev_check_start
-ev_check_stop
-ev_child_start
-ev_child_stop
-ev_cleanup_start
-ev_cleanup_stop
-ev_clear_pending
-ev_default_loop
-ev_default_loop_ptr
-ev_depth
-ev_embed_start
-ev_embed_stop
-ev_embed_sweep
-ev_embeddable_backends
-ev_feed_event
-ev_feed_fd_event
-ev_feed_signal
-ev_feed_signal_event
-ev_fork_start
-ev_fork_stop
-ev_idle_start
-ev_idle_stop
-ev_invoke
-ev_invoke_pending
-ev_io_start
-ev_io_stop
-ev_iteration
-ev_loop_destroy
-ev_loop_fork
-ev_loop_new
-ev_now
-ev_now_update
-ev_once
-ev_pending_count
-ev_periodic_again
-ev_periodic_start
-ev_periodic_stop
-ev_prepare_start
-ev_prepare_stop
-ev_recommended_backends
-ev_ref
-ev_resume
-ev_run
-ev_set_allocator
-ev_set_invoke_pending_cb
-ev_set_io_collect_interval
-ev_set_loop_release_cb
-ev_set_syserr_cb
-ev_set_timeout_collect_interval
-ev_set_userdata
-ev_signal_start
-ev_signal_stop
-ev_sleep
-ev_stat_start
-ev_stat_stat
-ev_stat_stop
-ev_supported_backends
-ev_suspend
-ev_time
-ev_timer_again
-ev_timer_remaining
-ev_timer_start
-ev_timer_stop
-ev_unref
-ev_userdata
-ev_verify
-ev_version_major
-ev_version_minor

libev/Symbols.event

-event_active
-event_add
-event_base_dispatch
-event_base_free
-event_base_get_method
-event_base_loop
-event_base_loopexit
-event_base_new
-event_base_once
-event_base_priority_init
-event_base_set
-event_del
-event_dispatch
-event_get_callback
-event_get_method
-event_get_version
-event_init
-event_loop
-event_loopexit
-event_once
-event_pending
-event_priority_init
-event_priority_set
-event_set

libev/autogen.sh

-#!/bin/sh
-
-autoreconf --install --symlink --force

libev/configure.ac

-orig_CFLAGS="$CFLAGS"
-
-AC_INIT
-AC_CONFIG_SRCDIR([ev_epoll.c])
-
-AM_INIT_AUTOMAKE(libev,4.11) dnl also update ev.h!
-AC_CONFIG_HEADERS([config.h])
-AM_MAINTAINER_MODE
-
-AC_PROG_CC
-
-dnl Supply default CFLAGS, if not specified
-if test -z "$orig_CFLAGS"; then
-  if test x$GCC = xyes; then
-    CFLAGS="-g -O3"
-  fi
-fi
-
-AC_PROG_INSTALL
-AC_PROG_LIBTOOL
-
-m4_include([libev.m4])
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT

libev/ev++.h

-/*
- * libev simple C++ wrapper classes
- *
- * Copyright (c) 2007,2008,2010 Marc Alexander Lehmann <libev@schmorp.de>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modifica-
- * tion, are permitted provided that the following conditions are met:
- *
- *   1.  Redistributions of source code must retain the above copyright notice,
- *       this list of conditions and the following disclaimer.
- *
- *   2.  Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in the
- *       documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * the GNU General Public License ("GPL") version 2 or any later version,
- * in which case the provisions of the GPL are applicable instead of
- * the above. If you wish to allow the use of your version of this file
- * only under the terms of the GPL and not to allow others to use your
- * version of this file under the BSD license, indicate your decision
- * by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL. If you do not delete the
- * provisions above, a recipient may use your version of this file under
- * either the BSD or the GPL.
- */
-
-#ifndef EVPP_H__
-#define EVPP_H__
-
-#ifdef EV_H
-# include EV_H
-#else
-# include "ev.h"
-#endif
-
-#ifndef EV_USE_STDEXCEPT
-# define EV_USE_STDEXCEPT 1
-#endif
-
-#if EV_USE_STDEXCEPT
-# include <stdexcept>
-#endif
-
-namespace ev {
-
-  typedef ev_tstamp tstamp;
-
-  enum {
-    UNDEF    = EV_UNDEF,
-    NONE     = EV_NONE,
-    READ     = EV_READ,
-    WRITE    = EV_WRITE,
-#if EV_COMPAT3
-    TIMEOUT  = EV_TIMEOUT,
-#endif
-    TIMER    = EV_TIMER,
-    PERIODIC = EV_PERIODIC,
-    SIGNAL   = EV_SIGNAL,
-    CHILD    = EV_CHILD,
-    STAT     = EV_STAT,
-    IDLE     = EV_IDLE,
-    CHECK    = EV_CHECK,
-    PREPARE  = EV_PREPARE,
-    FORK     = EV_FORK,
-    ASYNC    = EV_ASYNC,
-    EMBED    = EV_EMBED,
-#   undef ERROR // some systems stupidly #define ERROR
-    ERROR    = EV_ERROR
-  };
-
-  enum
-  {
-    AUTO      = EVFLAG_AUTO,
-    NOENV     = EVFLAG_NOENV,
-    FORKCHECK = EVFLAG_FORKCHECK,
-
-    SELECT    = EVBACKEND_SELECT,
-    POLL      = EVBACKEND_POLL,
-    EPOLL     = EVBACKEND_EPOLL,
-    KQUEUE    = EVBACKEND_KQUEUE,
-    DEVPOLL   = EVBACKEND_DEVPOLL,
-    PORT      = EVBACKEND_PORT
-  };
-
-  enum
-  {
-#if EV_COMPAT3
-    NONBLOCK = EVLOOP_NONBLOCK,
-    ONESHOT  = EVLOOP_ONESHOT,
-#endif
-    NOWAIT   = EVRUN_NOWAIT,
-    ONCE     = EVRUN_ONCE
-  };
-
-  enum how_t
-  {
-    ONE = EVBREAK_ONE,
-    ALL = EVBREAK_ALL
-  };
-
-  struct bad_loop
-#if EV_USE_STDEXCEPT
-  : std::runtime_error
-#endif
-  {
-#if EV_USE_STDEXCEPT
-    bad_loop ()
-    : std::runtime_error ("libev event loop cannot be initialized, bad value of LIBEV_FLAGS?")
-    {
-    }
-#endif
-  };
-
-#ifdef EV_AX
-#  undef EV_AX
-#endif
-
-#ifdef EV_AX_
-#  undef EV_AX_
-#endif
-
-#if EV_MULTIPLICITY
-#  define EV_AX  raw_loop
-#  define EV_AX_ raw_loop,
-#else
-#  define EV_AX
-#  define EV_AX_
-#endif
-
-  struct loop_ref
-  {
-    loop_ref (EV_P) throw ()
-#if EV_MULTIPLICITY
-    : EV_AX (EV_A)
-#endif
-    {
-    }
-
-    bool operator == (const loop_ref &other) const throw ()
-    {
-#if EV_MULTIPLICITY
-      return EV_AX == other.EV_AX;
-#else
-      return true;
-#endif
-    }
-
-    bool operator != (const loop_ref &other) const throw ()
-    {
-#if EV_MULTIPLICITY
-      return ! (*this == other);
-#else
-      return false;
-#endif
-    }
-
-#if EV_MULTIPLICITY
-    bool operator == (const EV_P) const throw ()
-    {
-      return this->EV_AX == EV_A;
-    }
-
-    bool operator != (const EV_P) const throw ()
-    {
-      return (*this == EV_A);
-    }
-
-    operator struct ev_loop * () const throw ()
-    {
-      return EV_AX;
-    }
-
-    operator const struct ev_loop * () const throw ()
-    {
-      return EV_AX;
-    }
-
-    bool is_default () const throw ()
-    {
-      return EV_AX == ev_default_loop (0);
-    }
-#endif
-
-#if EV_COMPAT3
-    void loop (int flags = 0)
-    {
-      ev_run (EV_AX_ flags);
-    }
-
-    void unloop (how_t how = ONE) throw ()
-    {
-      ev_break (EV_AX_ how);
-    }
-#endif
-
-    void run (int flags = 0)
-    {
-      ev_run (EV_AX_ flags);
-    }
-
-    void break_loop (how_t how = ONE) throw ()
-    {
-      ev_break (EV_AX_ how);
-    }
-
-    void post_fork () throw ()
-    {
-      ev_loop_fork (EV_AX);
-    }
-
-    unsigned int backend () const throw ()
-    {
-      return ev_backend (EV_AX);
-    }
-
-    tstamp now () const throw ()
-    {
-      return ev_now (EV_AX);
-    }
-
-    void ref () throw ()
-    {
-      ev_ref (EV_AX);
-    }
-
-    void unref () throw ()
-    {
-      ev_unref (EV_AX);
-    }
-
-#if EV_FEATURE_API
-    unsigned int iteration () const throw ()
-    {
-      return ev_iteration (EV_AX);
-    }
-
-    unsigned int depth () const throw ()
-    {
-      return ev_depth (EV_AX);
-    }
-
-    void set_io_collect_interval (tstamp interval) throw ()
-    {
-      ev_set_io_collect_interval (EV_AX_ interval);
-    }
-
-    void set_timeout_collect_interval (tstamp interval) throw ()
-    {
-      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 ()
-    {
-      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 ()
-    {
-      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 ()
-    {
-      once (fd, events, timeout, method_thunk<K, &K::operator ()>, object);
-    }
-
-    template<class K, void (K::*method)(int)>
-    static void method_thunk (int revents, void *arg)
-    {
-      (static_cast<K *>(arg)->*method)
-        (revents);
-    }
-
-    // no-argument method callback
-    template<class K, void (K::*method)()>
-    void once (int fd, int events, tstamp timeout, K *object) throw ()
-    {
-      once (fd, events, timeout, method_noargs_thunk<K, method>, object);
-    }
-
-    template<class K, void (K::*method)()>
-    static void method_noargs_thunk (int revents, void *arg)
-    {
-      (static_cast<K *>(arg)->*method)
-        ();
-    }
-
-    // simpler function callback
-    template<void (*cb)(int)>
-    void once (int fd, int events, tstamp timeout) throw ()
-    {
-      once (fd, events, timeout, simpler_func_thunk<cb>);
-    }
-
-    template<void (*cb)(int)>
-    static void simpler_func_thunk (int revents, void *arg)
-    {
-      (*cb)
-        (revents);
-    }
-
-    // simplest function callback
-    template<void (*cb)()>
-    void once (int fd, int events, tstamp timeout) throw ()
-    {
-      once (fd, events, timeout, simplest_func_thunk<cb>);
-    }
-
-    template<void (*cb)()>
-    static void simplest_func_thunk (int revents, void *arg)
-    {
-      (*cb)
-        ();
-    }
-
-    void feed_fd_event (int fd, int revents) throw ()
-    {
-      ev_feed_fd_event (EV_AX_ fd, revents);
-    }
-
-    void feed_signal_event (int signum) throw ()
-    {
-      ev_feed_signal_event (EV_AX_ signum);
-    }
-
-#if EV_MULTIPLICITY
-    struct ev_loop* EV_AX;
-#endif
-
-  };
-
-#if EV_MULTIPLICITY
-  struct dynamic_loop : loop_ref
-  {
-
-    dynamic_loop (unsigned int flags = AUTO) throw (bad_loop)
-    : loop_ref (ev_loop_new (flags))
-    {
-      if (!EV_AX)
-        throw bad_loop ();
-    }
-
-    ~dynamic_loop () throw ()
-    {
-      ev_loop_destroy (EV_AX);
-      EV_AX = 0;
-    }
-
-  private:
-
-    dynamic_loop (const dynamic_loop &);
-
-    dynamic_loop & operator= (const dynamic_loop &);
-
-  };
-#endif
-
-  struct default_loop : loop_ref
-  {
-    default_loop (unsigned int flags = AUTO) throw (bad_loop)
-#if EV_MULTIPLICITY
-    : loop_ref (ev_default_loop (flags))
-#endif
-    {
-      if (
-#if EV_MULTIPLICITY
-          !EV_AX
-#else
-          !ev_default_loop (flags)
-#endif
-      )
-        throw bad_loop ();
-    }
-
-  private:
-    default_loop (const default_loop &);
-    default_loop &operator = (const default_loop &);
-  };
-
-  inline loop_ref get_default_loop () throw ()
-  {
-#if EV_MULTIPLICITY
-    return ev_default_loop (0);
-#else
-    return loop_ref ();
-#endif
-  }
-
-#undef EV_AX
-#undef EV_AX_
-
-#undef EV_PX
-#undef EV_PX_
-#if EV_MULTIPLICITY
-#  define EV_PX  loop_ref EV_A
-#  define EV_PX_ loop_ref EV_A_
-#else
-#  define EV_PX
-#  define EV_PX_
-#endif
-
-  template<class ev_watcher, class watcher>
-  struct base : ev_watcher
-  {
-    #if EV_MULTIPLICITY
-      EV_PX;
-
-      // loop set
-      void set (EV_P) throw ()
-      {
-        this->EV_A = EV_A;
-      }
-    #endif
-
-    base (EV_PX) throw ()
-    #if EV_MULTIPLICITY
-      : EV_A (EV_A)
-    #endif
-    {
-      ev_init (this, 0);
-    }
-
-    void set_ (const void *data, void (*cb)(EV_P_ ev_watcher *w, int revents)) throw ()
-    {
-      this->data = (void *)data;
-      ev_set_cb (static_cast<ev_watcher *>(this), cb);
-    }
-
-    // function callback
-    template<void (*function)(watcher &w, int)>
-    void set (void *data = 0) throw ()
-    {
-      set_ (data, function_thunk<function>);
-    }
-
-    template<void (*function)(watcher &w, int)>
-    static void function_thunk (EV_P_ ev_watcher *w, int revents)
-    {
-      function
-        (*static_cast<watcher *>(w), revents);
-    }
-
-    // method callback
-    template<class K, void (K::*method)(watcher &w, int)>
-    void set (K *object) throw ()
-    {
-      set_ (object, method_thunk<K, method>);
-    }
-
-    // default method == operator ()
-    template<class K>
-    void set (K *object) throw ()
-    {
-      set_ (object, method_thunk<K, &K::operator ()>);
-    }
-
-    template<class K, void (K::*method)(watcher &w, int)>
-    static void method_thunk (EV_P_ ev_watcher *w, int revents)
-    {
-      (static_cast<K *>(w->data)->*method)
-        (*static_cast<watcher *>(w), revents);
-    }
-
-    // no-argument callback
-    template<class K, void (K::*method)()>
-    void set (K *object) throw ()
-    {
-      set_ (object, method_noargs_thunk<K, method>);
-    }
-
-    template<class K, void (K::*method)()>
-    static void method_noargs_thunk (EV_P_ ev_watcher *w, int revents)
-    {
-      (static_cast<K *>(w->data)->*method)
-        ();
-    }
-
-    void operator ()(int events = EV_UNDEF)
-    {
-      return
-        ev_cb (static_cast<ev_watcher *>(this))
-          (static_cast<ev_watcher *>(this), events);
-    }
-
-    bool is_active () const throw ()
-    {
-      return ev_is_active (static_cast<const ev_watcher *>(this));
-    }
-
-    bool is_pending () const throw ()
-    {
-      return ev_is_pending (static_cast<const ev_watcher *>(this));
-    }
-
-    void feed_event (int revents) throw ()
-    {
-      ev_feed_event (EV_A_ static_cast<ev_watcher *>(this), revents);
-    }
-  };
-
-  inline tstamp now (EV_P) throw ()
-  {
-    return ev_now (EV_A);
-  }
-
-  inline void delay (tstamp interval) throw ()
-  {
-    ev_sleep (interval);
-  }
-
-  inline int version_major () throw ()
-  {
-    return ev_version_major ();
-  }
-
-  inline int version_minor () throw ()
-  {
-    return ev_version_minor ();
-  }
-
-  inline unsigned int supported_backends () throw ()
-  {
-    return ev_supported_backends ();
-  }
-
-  inline unsigned int recommended_backends () throw ()
-  {
-    return ev_recommended_backends ();
-  }
-
-  inline unsigned int embeddable_backends () throw ()
-  {
-    return ev_embeddable_backends ();
-  }
-
-  inline void set_allocator (void *(*cb)(void *ptr, long size) throw ()) throw ()
-  {
-    ev_set_allocator (cb);
-  }
-
-  inline void set_syserr_cb (void (*cb)(const char *msg) throw ()) throw ()
-  {
-    ev_set_syserr_cb (cb);
-  }
-
-  #if EV_MULTIPLICITY
-    #define EV_CONSTRUCT(cppstem,cstem)	                                                \
-      (EV_PX = get_default_loop ()) throw ()                                            \
-        : base<ev_ ## cstem, cppstem> (EV_A)                                            \
-      {                                                                                 \
-      }
-  #else
-    #define EV_CONSTRUCT(cppstem,cstem)                                                 \
-      () throw ()                                                                       \
-      {                                                                                 \
-      }
-  #endif
-
-  /* using a template here would require quite a bit more lines,
-   * so a macro solution was chosen */
-  #define EV_BEGIN_WATCHER(cppstem,cstem)	                                        \
-                                                                                        \
-  struct cppstem : base<ev_ ## cstem, cppstem>                                          \
-  {                                                                                     \
-    void start () throw ()                                                              \
-    {                                                                                   \
-      ev_ ## cstem ## _start (EV_A_ static_cast<ev_ ## cstem *>(this));                 \
-    }                                                                                   \
-                                                                                        \
-    void stop () throw ()                                                               \
-    {                                                                                   \
-      ev_ ## cstem ## _stop (EV_A_ static_cast<ev_ ## cstem *>(this));                  \
-    }                                                                                   \
-                                                                                        \
-    cppstem EV_CONSTRUCT(cppstem,cstem)                                                 \
-                                                                                        \
-    ~cppstem () throw ()                                                                \
-    {                                                                                   \
-      stop ();                                                                          \
-    }                                                                                   \
-                                                                                        \
-    using base<ev_ ## cstem, cppstem>::set;                                             \
-                                                                                        \
-  private:                                                                              \
-                                                                                        \
-    cppstem (const cppstem &o);                                                         \
-                                                                                        \
-    cppstem &operator =(const cppstem &o);                                              \
-                                                                                        \
-  public:
-
-  #define EV_END_WATCHER(cppstem,cstem)	                                                \
-  };
-
-  EV_BEGIN_WATCHER (io, io)
-    void set (int fd, int events) throw ()
-    {
-      int active = is_active ();
-      if (active) stop ();
-      ev_io_set (static_cast<ev_io *>(this), fd, events);
-      if (active) start ();
-    }
-
-    void set (int events) throw ()
-    {
-      int active = is_active ();
-      if (active) stop ();
-      ev_io_set (static_cast<ev_io *>(this), fd, events);
-      if (active) start ();
-    }
-
-    void start (int fd, int events) throw ()
-    {
-      set (fd, events);
-      start ();
-    }
-  EV_END_WATCHER (io, io)
-
-  EV_BEGIN_WATCHER (timer, timer)
-    void set (ev_tstamp after, ev_tstamp repeat = 0.) throw ()
-    {
-      int active = is_active ();
-      if (active) stop ();
-      ev_timer_set (static_cast<ev_timer *>(this), after, repeat);
-      if (active) start ();
-    }
-
-    void start (ev_tstamp after, ev_tstamp repeat = 0.) throw ()
-    {
-      set (after, repeat);
-      start ();
-    }
-
-    void again () throw ()
-    {
-      ev_timer_again (EV_A_ static_cast<ev_timer *>(this));
-    }
-
-    ev_tstamp remaining ()
-    {
-      return ev_timer_remaining (EV_A_ static_cast<ev_timer *>(this));
-    }
-  EV_END_WATCHER (timer, timer)
-
-  #if EV_PERIODIC_ENABLE
-  EV_BEGIN_WATCHER (periodic, periodic)
-    void set (ev_tstamp at, ev_tstamp interval = 0.) throw ()
-    {
-      int active = is_active ();
-      if (active) stop ();
-      ev_periodic_set (static_cast<ev_periodic *>(this), at, interval, 0);
-      if (active) start ();
-    }
-
-    void start (ev_tstamp at, ev_tstamp interval = 0.) throw ()
-    {
-      set (at, interval);
-      start ();
-    }
-
-    void again () throw ()
-    {
-      ev_periodic_again (EV_A_ static_cast<ev_periodic *>(this));
-    }
-  EV_END_WATCHER (periodic, periodic)
-  #endif
-
-  #if EV_SIGNAL_ENABLE
-  EV_BEGIN_WATCHER (sig, signal)
-    void set (int signum) throw ()
-    {
-      int active = is_active ();
-      if (active) stop ();
-      ev_signal_set (static_cast<ev_signal *>(this), signum);
-      if (active) start ();
-    }
-
-    void start (int signum) throw ()
-    {
-      set (signum);
-      start ();
-    }
-  EV_END_WATCHER (sig, signal)
-  #endif
-
-  #if EV_CHILD_ENABLE
-  EV_BEGIN_WATCHER (child, child)
-    void set (int pid, int trace = 0) throw ()
-    {
-      int active = is_active ();
-      if (active) stop ();
-      ev_child_set (static_cast<ev_child *>(this), pid, trace);
-      if (active) start ();
-    }
-
-    void start (int pid, int trace = 0) throw ()
-    {
-      set (pid, trace);
-      start ();
-    }
-  EV_END_WATCHER (child, child)
-  #endif
-
-  #if EV_STAT_ENABLE
-  EV_BEGIN_WATCHER (stat, stat)
-    void set (const char *path, ev_tstamp interval = 0.) throw ()
-    {
-      int active = is_active ();
-      if (active) stop ();
-      ev_stat_set (static_cast<ev_stat *>(this), path, interval);
-      if (active) start ();
-    }
-
-    void start (const char *path, ev_tstamp interval = 0.) throw ()
-    {
-      stop ();
-      set (path, interval);
-      start ();
-    }
-
-    void update () throw ()
-    {
-      ev_stat_stat (EV_A_ static_cast<ev_stat *>(this));
-    }
-  EV_END_WATCHER (stat, stat)
-  #endif
-
-  #if EV_IDLE_ENABLE
-  EV_BEGIN_WATCHER (idle, idle)
-    void set () throw () { }
-  EV_END_WATCHER (idle, idle)
-  #endif
-
-  #if EV_PREPARE_ENABLE
-  EV_BEGIN_WATCHER (prepare, prepare)
-    void set () throw () { }
-  EV_END_WATCHER (prepare, prepare)
-  #endif
-
-  #if EV_CHECK_ENABLE
-  EV_BEGIN_WATCHER (check, check)
-    void set () throw () { }
-  EV_END_WATCHER (check, check)
-  #endif
-
-  #if EV_EMBED_ENABLE
-  EV_BEGIN_WATCHER (embed, embed)
-    void set_embed (struct ev_loop *embedded_loop) throw ()
-    {
-      int active = is_active ();
-      if (active) stop ();
-      ev_embed_set (static_cast<ev_embed *>(this), embedded_loop);
-      if (active) start ();
-    }
-
-    void start (struct ev_loop *embedded_loop) throw ()
-    {
-      set (embedded_loop);
-      start ();
-    }
-
-    void sweep ()
-    {
-      ev_embed_sweep (EV_A_ static_cast<ev_embed *>(this));
-    }
-  EV_END_WATCHER (embed, embed)
-  #endif
-
-  #if EV_FORK_ENABLE
-  EV_BEGIN_WATCHER (fork, fork)
-    void set () throw () { }
-  EV_END_WATCHER (fork, fork)
-  #endif
-
-  #if EV_ASYNC_ENABLE
-  EV_BEGIN_WATCHER (async, async)
-    void send () throw ()
-    {
-      ev_async_send (EV_A_ static_cast<ev_async *>(this));
-    }
-
-    bool async_pending () throw ()
-    {
-      return ev_async_pending (static_cast<ev_async *>(this));
-    }
-  EV_END_WATCHER (async, async)
-  #endif
-
-  #undef EV_PX
-  #undef EV_PX_
-  #undef EV_CONSTRUCT
-  #undef EV_BEGIN_WATCHER
-  #undef EV_END_WATCHER
-}
-
-#endif
-

libev/ev.3

-.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
-.\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings.  \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-.    ds -- \(*W-
-.    ds PI pi
-.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
-.    ds L" ""
-.    ds R" ""
-.    ds C` ""
-.    ds C' ""
-'br\}
-.el\{\
-.    ds -- \|\(em\|
-.    ds PI \(*p
-.    ds L" ``
-.    ds R" ''
-'br\}
-.\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
-.\" entries marked with X<> in POD.  Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.ie \nF \{\
-.    de IX
-.    tm Index:\\$1\t\\n%\t"\\$2"
-..
-.    nr % 0
-.    rr F
-.\}
-.el \{\
-.    de IX
-..
-.\}
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
-.    \" fudge factors for nroff and troff
-.if n \{\
-.    ds #H 0
-.    ds #V .8m
-.    ds #F .3m
-.    ds #[ \f1
-.    ds #] \fP
-.\}
-.if t \{\
-.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-.    ds #V .6m
-.    ds #F 0
-.    ds #[ \&
-.    ds #] \&
-.\}
-.    \" simple accents for nroff and troff
-.if n \{\
-.    ds ' \&
-.    ds ` \&
-.    ds ^ \&
-.    ds , \&
-.    ds ~ ~
-.    ds /
-.\}
-.if t \{\
-.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-.    \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-.    \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-.    \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-.    ds : e
-.    ds 8 ss
-.    ds o a
-.    ds d- d\h'-1'\(ga
-.    ds D- D\h'-1'\(hy
-.    ds th \o'bp'
-.    ds Th \o'LP'
-.    ds ae ae
-.    ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "LIBEV 3"
-.TH LIBEV 3 "2012-05-26" "libev-4.11" "libev - high performance full featured event loop"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
-.SH "NAME"
-libev \- a high performance full\-featured event loop written in C
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-.Vb 1
-\&   #include <ev.h>
-.Ve
-.SS "\s-1EXAMPLE\s0 \s-1PROGRAM\s0"
-.IX Subsection "EXAMPLE PROGRAM"
-.Vb 2
-\&   // a single header file is required
-\&   #include <ev.h>
-\&
-\&   #include <stdio.h> // for puts
-\&
-\&   // every watcher type has its own typedef\*(Aqd struct
-\&   // with the name ev_TYPE
-\&   ev_io stdin_watcher;
-\&   ev_timer timeout_watcher;
-\&
-\&   // all watcher callbacks have a similar signature
-\&   // this callback is called when data is readable on stdin
-\&   static void
-\&   stdin_cb (EV_P_ ev_io *w, int revents)
-\&   {
-\&     puts ("stdin ready");
-\&     // for one\-shot events, one must manually stop the watcher
-\&     // with its corresponding stop function.
-\&     ev_io_stop (EV_A_ w);
-\&
-\&     // this causes all nested ev_run\*(Aqs to stop iterating
-\&     ev_break (EV_A_ EVBREAK_ALL);
-\&   }
-\&
-\&   // another callback, this time for a time\-out
-\&   static void
-\&   timeout_cb (EV_P_ ev_timer *w, int revents)
-\&   {
-\&     puts ("timeout");
-\&     // this causes the innermost ev_run to stop iterating
-\&     ev_break (EV_A_ EVBREAK_ONE);
-\&   }
-\&
-\&   int
-\&   main (void)
-\&   {
-\&     // use the default event loop unless you have special needs
-\&     struct ev_loop *loop = EV_DEFAULT;
-\&
-\&     // initialise an io watcher, then start it
-\&     // this one will watch for stdin to become readable
-\&     ev_io_init (&stdin_watcher, stdin_cb, /*STDIN_FILENO*/ 0, EV_READ);
-\&     ev_io_start (loop, &stdin_watcher);
-\&
-\&     // initialise a timer watcher, then start it
-\&     // simple non\-repeating 5.5 second timeout
-\&     ev_timer_init (&timeout_watcher, timeout_cb, 5.5, 0.);
-\&     ev_timer_start (loop, &timeout_watcher);
-\&
-\&     // now wait for events to arrive
-\&     ev_run (loop, 0);
-\&
-\&     // break was called, so exit
-\&     return 0;
-\&   }
-.Ve
-.SH "ABOUT THIS DOCUMENT"
-.IX Header "ABOUT THIS DOCUMENT"
-This document documents the libev software package.
-.PP
-The newest version of this document is also available as an html-formatted
-web page you might find easier to navigate when reading it for the first
-time: <http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod>.
-.PP
-While this document tries to be as complete as possible in documenting
-libev, its usage and the rationale behind its design, it is not a tutorial
-on event-based programming, nor will it introduce event-based programming
-with libev.
-.PP
-Familiarity with event based programming techniques in general is assumed
-throughout this document.
-.SH "WHAT TO READ WHEN IN A HURRY"
-.IX Header "WHAT TO READ WHEN IN A HURRY"
-This manual tries to be very detailed, but unfortunately, this also makes
-it very long. If you just want to know the basics of libev, I suggest
-reading \*(L"\s-1ANATOMY\s0 \s-1OF\s0 A \s-1WATCHER\s0\*(R", then the \*(L"\s-1EXAMPLE\s0 \s-1PROGRAM\s0\*(R" above and
-look up the missing functions in \*(L"\s-1GLOBAL\s0 \s-1FUNCTIONS\s0\*(R" and the \f(CW\*(C`ev_io\*(C'\fR and
-\&\f(CW\*(C`ev_timer\*(C'\fR sections in \*(L"\s-1WATCHER\s0 \s-1TYPES\s0\*(R".
-.SH "ABOUT LIBEV"
-.IX Header "ABOUT LIBEV"
-Libev is an event loop: you register interest in certain events (such as a
-file descriptor being readable or a timeout occurring), and it will manage
-these event sources and provide your program with events.
-.PP
-To do this, it must take more or less complete control over your process
-(or thread) by executing the \fIevent loop\fR handler, and will then
-communicate events via a callback mechanism.
-.PP
-You register interest in certain events by registering so-called \fIevent
-watchers\fR, which are relatively small C structures you initialise with the
-details of the event, and then hand it over to libev by \fIstarting\fR the
-watcher.
-.SS "\s-1FEATURES\s0"
-.IX Subsection "FEATURES"
-Libev supports \f(CW\*(C`select\*(C'\fR, \f(CW\*(C`poll\*(C'\fR, the Linux-specific \f(CW\*(C`epoll\*(C'\fR, the
-BSD-specific \f(CW\*(C`kqueue\*(C'\fR and the Solaris-specific event port mechanisms
-for file descriptor events (\f(CW\*(C`ev_io\*(C'\fR), the Linux \f(CW\*(C`inotify\*(C'\fR interface
-(for \f(CW\*(C`ev_stat\*(C'\fR), Linux eventfd/signalfd (for faster and cleaner
-inter-thread wakeup (\f(CW\*(C`ev_async\*(C'\fR)/signal handling (\f(CW\*(C`ev_signal\*(C'\fR)) relative
-timers (\f(CW\*(C`ev_timer\*(C'\fR), absolute timers with customised rescheduling
-(\f(CW\*(C`ev_periodic\*(C'\fR), synchronous signals (\f(CW\*(C`ev_signal\*(C'\fR), process status
-change events (\f(CW\*(C`ev_child\*(C'\fR), and event watchers dealing with the event
-loop mechanism itself (\f(CW\*(C`ev_idle\*(C'\fR, \f(CW\*(C`ev_embed\*(C'\fR, \f(CW\*(C`ev_prepare\*(C'\fR and
-\&\f(CW\*(C`ev_check\*(C'\fR watchers) as well as file watchers (\f(CW\*(C`ev_stat\*(C'\fR) and even
-limited support for fork events (\f(CW\*(C`ev_fork\*(C'\fR).
-.PP
-It also is quite fast (see this
-benchmark <http://libev.schmorp.de/bench.html> comparing it to libevent
-for example).
-.SS "\s-1CONVENTIONS\s0"
-.IX Subsection "CONVENTIONS"
-Libev is very configurable. In this manual the default (and most common)
-configuration will be described, which supports multiple event loops. For
-more info about various configuration options please have a look at
-\&\fB\s-1EMBED\s0\fR section in this manual. If libev was configured without support
-for multiple event loops, then all functions taking an initial argument of
-name \f(CW\*(C`loop\*(C'\fR (which is always of type \f(CW\*(C`struct ev_loop *\*(C'\fR) will not have
-this argument.
-.SS "\s-1TIME\s0 \s-1REPRESENTATION\s0"
-.IX Subsection "TIME REPRESENTATION"
-Libev represents time as a single floating point number, representing
-the (fractional) number of seconds since the (\s-1POSIX\s0) epoch (in practice
-somewhere near the beginning of 1970, details are complicated, don't
-ask). This type is called \f(CW\*(C`ev_tstamp\*(C'\fR, which is what you should use
-too. It usually aliases to the \f(CW\*(C`double\*(C'\fR type in C. When you need to do
-any calculations on it, you should treat it as some floating point value.
-.PP
-Unlike the name component \f(CW\*(C`stamp\*(C'\fR might indicate, it is also used for
-time differences (e.g. delays) throughout libev.
-.SH "ERROR HANDLING"
-.IX Header "ERROR HANDLING"
-Libev knows three classes of errors: operating system errors, usage errors
-and internal errors (bugs).
-.PP
-When libev catches an operating system error it cannot handle (for example
-a system call indicating a condition libev cannot fix), it calls the callback
-set via \f(CW\*(C`ev_set_syserr_cb\*(C'\fR, which is supposed to fix the problem or
-abort. The default is to print a diagnostic message and to call \f(CW\*(C`abort
-()\*(C'\fR.
-.PP
-When libev detects a usage error such as a negative timer interval, then
-it will print a diagnostic message and abort (via the \f(CW\*(C`assert\*(C'\fR mechanism,
-so \f(CW\*(C`NDEBUG\*(C'\fR will disable this checking): these are programming errors in
-the libev caller and need to be fixed there.
-.PP
-Libev also has a few internal error-checking \f(CW\*(C`assert\*(C'\fRions, and also has
-extensive consistency checking code. These do not trigger under normal
-circumstances, as they indicate either a bug in libev or worse.
-.SH "GLOBAL FUNCTIONS"
-.IX Header "GLOBAL FUNCTIONS"
-These functions can be called anytime, even before initialising the
-library in any way.
-.IP "ev_tstamp ev_time ()" 4
-.IX Item "ev_tstamp ev_time ()"
-Returns the current time as libev would use it. Please note that the
-\&\f(CW\*(C`ev_now\*(C'\fR function is usually faster and also often returns the timestamp
-you actually want to know. Also interesting is the combination of
-\&\f(CW\*(C`ev_now_update\*(C'\fR and \f(CW\*(C`ev_now\*(C'\fR.
-.IP "ev_sleep (ev_tstamp interval)" 4
-.IX Item "ev_sleep (ev_tstamp interval)"
-Sleep for the given interval: The current thread will be blocked
-until either it is interrupted or the given time interval has
-passed (approximately \- it might return a bit earlier even if not
-interrupted). Returns immediately if \f(CW\*(C`interval <= 0\*(C'\fR.
-.Sp
-Basically this is a sub-second-resolution \f(CW\*(C`sleep ()\*(C'\fR.
-.Sp
-The range of the \f(CW\*(C`interval\*(C'\fR is limited \- libev only guarantees to work
-with sleep times of up to one day (\f(CW\*(C`interval <= 86400\*(C'\fR).
-.IP "int ev_version_major ()" 4
-.IX Item "int ev_version_major ()"
-.PD 0
-.IP "int ev_version_minor ()" 4
-.IX Item "int ev_version_minor ()"
-.PD
-You can find out the major and minor \s-1ABI\s0 version numbers of the library
-you linked against by calling the functions \f(CW\*(C`ev_version_major\*(C'\fR and
-\&\f(CW\*(C`ev_version_minor\*(C'\fR. If you want, you can compare against the global
-symbols \f(CW\*(C`EV_VERSION_MAJOR\*(C'\fR and \f(CW\*(C`EV_VERSION_MINOR\*(C'\fR, which specify the
-version of the library your program was compiled against.
-.Sp
-These version numbers refer to the \s-1ABI\s0 version of the library, not the
-release version.
-.Sp
-Usually, it's a good idea to terminate if the major versions mismatch,
-as this indicates an incompatible change. Minor versions are usually
-compatible to older versions, so a larger minor version alone is usually
-not a problem.
-.Sp
-Example: Make sure we haven't accidentally been linked against the wrong
-version (note, however, that this will not detect other \s-1ABI\s0 mismatches,
-such as \s-1LFS\s0 or reentrancy).
-.Sp
-.Vb 3
-\&   assert (("libev version mismatch",
-\&            ev_version_major () == EV_VERSION_MAJOR
-\&            && ev_version_minor () >= EV_VERSION_MINOR));
-.Ve
-.IP "unsigned int ev_supported_backends ()" 4
-.IX Item "unsigned int ev_supported_backends ()"
-Return the set of all backends (i.e. their corresponding \f(CW\*(C`EV_BACKEND_*\*(C'\fR
-value) compiled into this binary of libev (independent of their
-availability on the system you are running on). See \f(CW\*(C`ev_default_loop\*(C'\fR for
-a description of the set values.
-.Sp
-Example: make sure we have the epoll method, because yeah this is cool and
-a must have and can we have a torrent of it please!!!11
-.Sp
-.Vb 2
-\&   assert (("sorry, no epoll, no sex",
-\&            ev_supported_backends () & EVBACKEND_EPOLL));
-.Ve
-.IP "unsigned int ev_recommended_backends ()" 4
-.IX Item "unsigned int ev_recommended_backends ()"
-Return the set of all backends compiled into this binary of libev and
-also recommended for this platform, meaning it will work for most file
-descriptor types. This set is often smaller than the one returned by
-\&\f(CW\*(C`ev_supported_backends\*(C'\fR, as for example kqueue is broken on most BSDs
-and will not be auto-detected unless you explicitly request it (assuming
-you know what you are doing). This is the set of backends that libev will
-probe for if you specify no backends explicitly.
-.IP "unsigned int ev_embeddable_backends ()" 4
-.IX Item "unsigned int ev_embeddable_backends ()"
-Returns the set of backends that are embeddable in other event loops. This
-value is platform-specific but can include backends not available on the
-current system. To find which embeddable backends might be supported on
-the current system, you would need to look at \f(CW\*(C`ev_embeddable_backends ()
-& ev_supported_backends ()\*(C'\fR, likewise for recommended ones.
-.Sp
-See the description of \f(CW\*(C`ev_embed\*(C'\fR watchers for more info.
-.IP "ev_set_allocator (void *(*cb)(void *ptr, long size) throw ())" 4
-.IX Item "ev_set_allocator (void *(*cb)(void *ptr, long size) throw ())"
-Sets the allocation function to use (the prototype is similar \- the
-semantics are identical to the \f(CW\*(C`realloc\*(C'\fR C89/SuS/POSIX function). It is
-used to allocate and free memory (no surprises here). If it returns zero
-when memory needs to be allocated (\f(CW\*(C`size != 0\*(C'\fR), the library might abort
-or take some potentially destructive action.
-.Sp
-Since some systems (at least OpenBSD and Darwin) fail to implement
-correct \f(CW\*(C`realloc\*(C'\fR semantics, libev will use a wrapper around the system
-\&\f(CW\*(C`realloc\*(C'\fR and \f(CW\*(C`free\*(C'\fR functions by default.
-.Sp
-You could override this function in high-availability programs to, say,
-free some memory if it cannot allocate memory, to use a special allocator,
-or even to sleep a while and retry until some memory is available.
-.Sp
-Example: Replace the libev allocator with one that waits a bit and then
-retries (example requires a standards-compliant \f(CW\*(C`realloc\*(C'\fR).
-.Sp
-.Vb 6
-\&   static void *
-\&   persistent_realloc (void *ptr, size_t size)
-\&   {
-\&     for (;;)
-\&       {
-\&         void *newptr = realloc (ptr, size);
-\&
-\&         if (newptr)
-\&           return newptr;
-\&
-\&         sleep (60);
-\&       }
-\&   }
-\&
-\&   ...
-\&   ev_set_allocator (persistent_realloc);
-.Ve
-.IP "ev_set_syserr_cb (void (*cb)(const char *msg) throw ())" 4
-.IX Item "ev_set_syserr_cb (void (*cb)(const char *msg) throw ())"
-Set the callback function to call on a retryable system call error (such
-as failed select, poll, epoll_wait). The message is a printable string
-indicating the system call or subsystem causing the problem. If this
-callback is set, then libev will expect it to remedy the situation, no
-matter what, when it returns. That is, libev will generally retry the
-requested operation, or, if the condition doesn't go away, do bad stuff
-(such as abort).
-.Sp
-Example: This is basically the same thing that libev does internally, too.
-.Sp
-.Vb 6
-\&   static void
-\&   fatal_error (const char *msg)
-\&   {
-\&     perror (msg);
-\&     abort ();
-\&   }
-\&
-\&   ...
-\&   ev_set_syserr_cb (fatal_error);
-.Ve
-.IP "ev_feed_signal (int signum)" 4
-.IX Item "ev_feed_signal (int signum)"
-This function can be used to \*(L"simulate\*(R" a signal receive. It is completely
-safe to call this function at any time, from any context, including signal
-handlers or random threads.
-.Sp
-Its main use is to customise signal handling in your process, especially
-in the presence of threads. For example, you could block signals
-by default in all threads (and specifying \f(CW\*(C`EVFLAG_NOSIGMASK\*(C'\fR when
-creating any loops), and in one thread, use \f(CW\*(C`sigwait\*(C'\fR or any other
-mechanism to wait for signals, then \*(L"deliver\*(R" them to libev by calling
-\&\f(CW\*(C`ev_feed_signal\*(C'\fR.
-.SH "FUNCTIONS CONTROLLING EVENT LOOPS"
-.IX Header "FUNCTIONS CONTROLLING EVENT LOOPS"
-An event loop is described by a \f(CW\*(C`struct ev_loop *\*(C'\fR (the \f(CW\*(C`struct\*(C'\fR is
-\&\fInot\fR optional in this case unless libev 3 compatibility is disabled, as
-libev 3 had an \f(CW\*(C`ev_loop\*(C'\fR function colliding with the struct name).
-.PP
-The library knows two types of such loops, the \fIdefault\fR loop, which
-supports child process events, and dynamically created event loops which
-do not.
-.IP "struct ev_loop *ev_default_loop (unsigned int flags)" 4
-.IX Item "struct ev_loop *ev_default_loop (unsigned int flags)"
-This returns the \*(L"default\*(R" event loop object, which is what you should
-normally use when you just need \*(L"the event loop\*(R". Event loop objects and
-the \f(CW\*(C`flags\*(C'\fR parameter are described in more detail in the entry for
-\&\f(CW\*(C`ev_loop_new\*(C'\fR.