Lines Matching refs:fd

109 static int aeApiLookupPending(aeApiState *state, int fd) {  in aeApiLookupPending()  argument
113 if (state->pending_fds[i] == fd) in aeApiLookupPending()
123 static int aeApiAssociate(const char *where, int portfd, int fd, int mask) { in aeApiAssociate() argument
133 fprintf(stderr, "%s: port_associate(%d, 0x%x) = ", where, fd, events); in aeApiAssociate()
135 rv = port_associate(portfd, PORT_SOURCE_FD, fd, events, in aeApiAssociate()
152 static int aeApiAddEvent(aeEventLoop *eventLoop, int fd, int mask) { in aeApiAddEvent() argument
157 fprintf(stderr, "aeApiAddEvent: fd %d mask 0x%x\n", fd, mask); in aeApiAddEvent()
164 fullmask = mask | eventLoop->events[fd].mask; in aeApiAddEvent()
165 pfd = aeApiLookupPending(state, fd); in aeApiAddEvent()
175 fprintf(stderr, "aeApiAddEvent: adding to pending fd %d\n", fd); in aeApiAddEvent()
180 return (aeApiAssociate("aeApiAddEvent", state->portfd, fd, fullmask)); in aeApiAddEvent()
183 static void aeApiDelEvent(aeEventLoop *eventLoop, int fd, int mask) { in aeApiDelEvent() argument
188 fprintf(stderr, "del fd %d mask 0x%x\n", fd, mask); in aeApiDelEvent()
190 pfd = aeApiLookupPending(state, fd); in aeApiDelEvent()
194 fprintf(stderr, "deleting event from pending fd %d\n", fd); in aeApiDelEvent()
217 fullmask = eventLoop->events[fd].mask; in aeApiDelEvent()
224 fprintf(stderr, "aeApiDelEvent: port_dissociate(%d)\n", fd); in aeApiDelEvent()
226 if (port_dissociate(state->portfd, PORT_SOURCE_FD, fd) != 0) { in aeApiDelEvent()
230 } else if (aeApiAssociate("aeApiDelEvent", state->portfd, fd, in aeApiDelEvent()
304 eventLoop->fired[i].fd = event[i].portev_object; in aeApiPoll()