Lines Matching refs:fd
44 static long long bp_count(int fd) in bp_count() argument
49 ret = read(fd, &count, sizeof(long long)); in bp_count()
66 int fd, i, fails = 0; in test__bp_signal_overflow() local
95 fd = sys_perf_event_open(&pe, 0, -1, -1, in test__bp_signal_overflow()
97 if (fd < 0) { in test__bp_signal_overflow()
102 fcntl(fd, F_SETFL, O_RDWR|O_NONBLOCK|O_ASYNC); in test__bp_signal_overflow()
103 fcntl(fd, F_SETSIG, SIGIO); in test__bp_signal_overflow()
104 fcntl(fd, F_SETOWN, getpid()); in test__bp_signal_overflow()
106 ioctl(fd, PERF_EVENT_IOC_RESET, 0); in test__bp_signal_overflow()
107 ioctl(fd, PERF_EVENT_IOC_ENABLE, 0); in test__bp_signal_overflow()
112 ioctl(fd, PERF_EVENT_IOC_DISABLE, 0); in test__bp_signal_overflow()
114 count = bp_count(fd); in test__bp_signal_overflow()
116 close(fd); in test__bp_signal_overflow()