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

Function getEventMask

src/ae_kqueue.c:50–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48#define EVENT_MASK_ENCODE(fd, mask) (((mask) & 0x3) << EVENT_MASK_OFFSET(fd))
49
50static inline int getEventMask(const char *eventsMask, int fd) {
51 return (eventsMask[fd/4] >> EVENT_MASK_OFFSET(fd)) & 0x3;
52}
53
54static inline void addEventMask(char *eventsMask, int fd, int mask) {
55 eventsMask[fd/4] |= EVENT_MASK_ENCODE(fd, mask);

Callers 1

aeApiPollFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected