MCPcopy Create free account
hub / github.com/F-Stack/f-stack / aeCreateFileEvent

Function aeCreateFileEvent

app/redis-6.2.6/src/ae.c:162–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162int aeCreateFileEvent(aeEventLoop *eventLoop, int fd, int mask,
163 aeFileProc *proc, void *clientData)
164{
165 if (fd >= eventLoop->setsize) {
166 errno = ERANGE;
167 return AE_ERR;
168 }
169 aeFileEvent *fe = &eventLoop->events[fd];
170
171 if (aeApiAddEvent(eventLoop, fd, mask) == -1)
172 return AE_ERR;
173 fe->mask |= mask;
174 if (mask & AE_READABLE) fe->rfileProc = proc;
175 if (mask & AE_WRITABLE) fe->wfileProc = proc;
176 fe->clientData = clientData;
177 if (fd > eventLoop->maxfd)
178 eventLoop->maxfd = fd;
179 return AE_OK;
180}
181
182void aeDeleteFileEvent(aeEventLoop *eventLoop, int fd, int mask)
183{

Callers 15

redisAeAddReadFunction · 0.85
redisAeAddWriteFunction · 0.85
registerSSLEventFunction · 0.85
updateSSLEventFunction · 0.85
initServerFunction · 0.85
rdbSaveToSlavesSocketsFunction · 0.85
resetClientFunction · 0.85
writeHandlerFunction · 0.85
createClientFunction · 0.85
connSocketConnectFunction · 0.85

Calls 1

aeApiAddEventFunction · 0.70

Tested by

no test coverage detected