Lines Matching refs:fd
38 int fd; in init_psi_monitor() local
42 fd = TEMP_FAILURE_RETRY(open(PSI_MON_FILE_MEMORY, O_WRONLY | O_CLOEXEC)); in init_psi_monitor()
43 if (fd < 0) { in init_psi_monitor()
67 res = TEMP_FAILURE_RETRY(write(fd, buf, strlen(buf) + 1)); in init_psi_monitor()
74 return fd; in init_psi_monitor()
77 close(fd); in init_psi_monitor()
81 int register_psi_monitor(int epollfd, int fd, void* data) { in register_psi_monitor() argument
87 res = epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &epev); in register_psi_monitor()
94 int unregister_psi_monitor(int epollfd, int fd) { in unregister_psi_monitor() argument
95 return epoll_ctl(epollfd, EPOLL_CTL_DEL, fd, NULL); in unregister_psi_monitor()
98 void destroy_psi_monitor(int fd) { in destroy_psi_monitor() argument
99 if (fd >= 0) { in destroy_psi_monitor()
100 close(fd); in destroy_psi_monitor()