Lines Matching refs:fd
43 bool EpollEventPoller::AddFileDescriptor(int fd, in AddFileDescriptor() argument
49 ctx->fd = fd; in AddFileDescriptor()
54 CHECK_TRUE(AddContextLocked(ctx), false, "add context for %d failed!", fd); in AddFileDescriptor()
58 bool EpollEventPoller::RemoveFileDescriptor(int fd) in RemoveFileDescriptor() argument
61 auto it = context_.find(fd); in RemoveFileDescriptor()
62 CHECK_TRUE(it != context_.end(), false, "fd %d not found in poll set!", fd); in RemoveFileDescriptor()
66 CHECK_TRUE(RemoveContextLocked(ctx), false, "remove context for %d failed!", fd); in RemoveFileDescriptor()
72 context_[ctx->fd] = ctx; in AddContextLocked()
78 context_.erase(ctx->fd); in RemoveContextLocked()
79 CHECK_TRUE(UpdateEvent(EPOLL_CTL_DEL, ctx), false, "update fd %d ctx FAILED!", ctx->fd); in RemoveContextLocked()
109 HILOG_DEBUG(LOG_CORE, "poll set %s %d %x start!", name.c_str(), ctx->fd, event.events); in UpdateEvent()
110 int retval = epoll_ctl(epollFd_, op, ctx->fd, &event); in UpdateEvent()
112 HILOG_DEBUG(LOG_CORE, "poll set %s %d %x done!", name.c_str(), ctx->fd, event.events); in UpdateEvent()
183 eventFdCtx->fd = eventFd; in Init()
211 HILOG_DEBUG(LOG_CORE, "remove context for %d", ctxPtr->fd); in Finalize()
215 for (int fd : fileDescriptors_) { in Finalize() local
216 close(fd); in Finalize()