Lines Matching refs:fd_
39 EventNotifier::EventNotifier(unsigned int initValue, unsigned int mask) : fd_(-1), flags_(O_CLOEXEC) in EventNotifier()
47 fd_ = eventfd(initValue, flags_); in EventNotifier()
48 CHECK_TRUE(fd_ >= 0, NO_RETVAL, "create eventfd FAILED, %d", errno); in EventNotifier()
49 HILOG_DEBUG(LOG_CORE, "EventNotifier create eventfd %d done!", fd_); in EventNotifier()
52 EventNotifier::EventNotifier(int fd) : fd_(fd), flags_(0) in EventNotifier()
54 int flags = fcntl(fd_, F_GETFL); in EventNotifier()
56 HILOG_DEBUG(LOG_CORE, "EventNotifier bind eventfd %d done!", fd_); in EventNotifier()
61 HILOG_DEBUG(LOG_CORE, "EventNotifier close eventfd %d", fd_); in ~EventNotifier()
62 close(fd_); in ~EventNotifier()
67 return fd_; in GetFd()
73 int retval = TEMP_FAILURE_RETRY(read(fd_, &value, sizeof(value))); in Take()
74 CHECK_TRUE(retval == sizeof(value), 0, "read value from eventfd %d failed, %d!", fd_, errno); in Take()
80 int retval = TEMP_FAILURE_RETRY(write(fd_, &value, sizeof(value))); in Post()
81 CHECK_TRUE(retval == sizeof(value), false, "write value to eventfd %d failed, %d!", fd_, errno); in Post()