summaryrefslogtreecommitdiff
path: root/ev.h
diff options
context:
space:
mode:
authorroot <root>2007-11-06 00:10:04 +0000
committerroot <root>2007-11-06 00:10:04 +0000
commitdeff62d26ff4c1324816c04c0c6db1e4db435870 (patch)
treea87ff66d97dd24912b1eee812549f8d52ea41f5b /ev.h
parent22c618bcb055597260be9be3a5815e08a4cea996 (diff)
better error handling
Diffstat (limited to 'ev.h')
-rw-r--r--ev.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/ev.h b/ev.h
index 1933285..08b5963 100644
--- a/ev.h
+++ b/ev.h
@@ -229,6 +229,20 @@ int ev_version_minor (void);
ev_tstamp ev_time (void);
+/* 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)(void));
+
# 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 */