MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / aeApiCreate

Function aeApiCreate

src/ae_select.c:42–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40} aeApiState;
41
42static int aeApiCreate(aeEventLoop *eventLoop) {
43 aeApiState *state = zmalloc(sizeof(aeApiState), MALLOC_LOCAL);
44
45 if (!state) return -1;
46 FD_ZERO(&state->rfds);
47 FD_ZERO(&state->wfds);
48 eventLoop->apidata = state;
49 return 0;
50}
51
52static int aeApiResize(aeEventLoop *eventLoop, int setsize) {
53 /* Just ensure we have enough room in the fd_set type. */

Callers 1

aeCreateEventLoopFunction · 0.70

Calls 1

zmallocFunction · 0.85

Tested by

no test coverage detected