summaryrefslogtreecommitdiff
path: root/src/ae_epoll.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_epoll.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_epoll.c')
-rw-r--r--src/ae_epoll.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ae_epoll.c b/src/ae_epoll.c
index 4823c281e..41af3e874 100644
--- a/src/ae_epoll.c
+++ b/src/ae_epoll.c
@@ -55,6 +55,13 @@ static int aeApiCreate(aeEventLoop *eventLoop) {
return 0;
}
+static int aeApiResize(aeEventLoop *eventLoop, int setsize) {
+ aeApiState *state = eventLoop->apidata;
+
+ state->events = zrealloc(state->events, sizeof(struct epoll_event)*setsize);
+ return 0;
+}
+
static void aeApiFree(aeEventLoop *eventLoop) {
aeApiState *state = eventLoop->apidata;