+
+/* Sets the allocation function to use, works like realloc.
+ * It is used to allocate and free memory.
+ * If it returns zero when memory needs to be allocated, the library might abort
+ * or take some potentially destructive action.
+ * The default is your system realloc function.
+ */
+void ev_set_allocator (void *(*cb)(void *ptr, long size));
+
+/* set the callback function to call on a
+ * retryable syscall error
+ * (such as failed select, poll, epoll_wait)
+ */
+void ev_set_syserr_cb (void (*cb)(const char *msg));
+
+# 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 */
+struct ev_loop *ev_default_loop (int methods); /* returns default loop */
+
+/* create and destroy alternative loops that don't handle signals */
+struct ev_loop *ev_loop_new (int methods);
+void ev_loop_destroy (EV_P);
+void ev_loop_fork (EV_P);
+
+ev_tstamp ev_now (EV_P); /* time w.r.t. timers and the eventloop, updated after each poll */
+
+# else
+
+int ev_default_loop (int methods); /* returns true when successful */
+
+static ev_tstamp
+ev_now ()
+{
+ extern ev_tstamp ev_rt_now;
+
+ return ev_rt_now;
+}
+# endif
+
+void ev_default_destroy (void); /* destroy the default loop */
+/* this needs to be called after fork, to duplicate the default loop */
+/* if you create alternative loops you have to call ev_loop_fork on them */
+/* you can call it in either the parent or the child */
+/* you can actually call it at any time, anywhere :) */
+void ev_default_fork (void);
+
+int ev_method (EV_P);