summaryrefslogtreecommitdiff
path: root/src/ae_kqueue.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2013-06-28 16:39:49 +0200
committerantirez <antirez@gmail.com>2013-06-28 16:39:49 +0200
commit8e2d082066e5b9892ead6cd30e8d3852d02fbc04 (patch)
tree1422465efe7dfb3cb8e4b78166c13800e99a72b9 /src/ae_kqueue.c
parent3130670b978e0d4baa805016386e5ca56af08123 (diff)
downloadredis-8e2d082066e5b9892ead6cd30e8d3852d02fbc04.tar.gz
ae.c event loop: API to resize the fd set size on the run.
Diffstat (limited to 'src/ae_kqueue.c')
-rw-r--r--src/ae_kqueue.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ae_kqueue.c b/src/ae_kqueue.c
index 458772f7e..dbcc5805f 100644
--- a/src/ae_kqueue.c
+++ b/src/ae_kqueue.c
@@ -54,10 +54,16 @@ static int aeApiCreate(aeEventLoop *eventLoop) {
return -1;
}
eventLoop->apidata = state;
-
return 0;
}
+static int aeApiResize(aeEventLoop *eventLoop, int setsize) {
+ aeApiState *state = eventLoop->apidata;
+
+ state->events = zrealloc(state->events, sizeof(struct kevent)*setsize);
+ return 0;
+}
+
static void aeApiFree(aeEventLoop *eventLoop) {
aeApiState *state = eventLoop->apidata;