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

Function aeDeleteFileEvent

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

Source from the content-addressed store, hash-verified

180}
181
182void aeDeleteFileEvent(aeEventLoop *eventLoop, int fd, int mask)
183{
184 if (fd >= eventLoop->setsize) return;
185 aeFileEvent *fe = &eventLoop->events[fd];
186 if (fe->mask == AE_NONE) return;
187
188 /* We want to always remove AE_BARRIER if set when AE_WRITABLE
189 * is removed. */
190 if (mask & AE_WRITABLE) mask |= AE_BARRIER;
191
192 aeApiDelEvent(eventLoop, fd, mask);
193 fe->mask = fe->mask & (~mask);
194 if (fd == eventLoop->maxfd && fe->mask == AE_NONE) {
195 /* Update the max fd */
196 int j;
197
198 for (j = eventLoop->maxfd-1; j >= 0; j--)
199 if (eventLoop->events[j].mask != AE_NONE) break;
200 eventLoop->maxfd = j;
201 }
202}
203
204int aeGetFileEvents(aeEventLoop *eventLoop, int fd) {
205 if (fd >= eventLoop->setsize) return 0;

Callers 15

redisAeDelReadFunction · 0.85
redisAeDelWriteFunction · 0.85
rdbPipeReadHandlerFunction · 0.85
registerSSLEventFunction · 0.85
updateSSLEventFunction · 0.85
closeSocketListenersFunction · 0.85
freeClientFunction · 0.85
resetClientFunction · 0.85
writeHandlerFunction · 0.85
connSocketCloseFunction · 0.85

Calls 1

aeApiDelEventFunction · 0.70

Tested by

no test coverage detected