Home
last modified time | relevance | path

Searched refs:epfd (Results 1 – 25 of 31) sorted by relevance

12

/external/ltp/testcases/kernel/syscalls/epoll_ctl/
Depoll_ctl02.c47 static int epfd; variable
64 {&epfd, EPOLL_CTL_ADD, &inv, &events[1], EBADF},
65 {&epfd, -1, &fd[1], &events[1], EINVAL},
66 {&epfd, EPOLL_CTL_ADD, &epfd, &events[1], EINVAL},
67 {&epfd, EPOLL_CTL_DEL, &fd[1], &events[1], ENOENT},
68 {&epfd, EPOLL_CTL_MOD, &fd[1], &events[1], ENOENT},
69 {&epfd, EPOLL_CTL_ADD, &fd[0], &events[0], EEXIST}
74 epfd = epoll_create(2); in setup()
75 if (epfd == -1) in setup()
83 TEST(epoll_ctl(epfd, EPOLL_CTL_ADD, fd[0], &events[0])); in setup()
[all …]
Depoll_ctl01.c38 static int epfd; variable
49 epfd = epoll_create(2); in setup()
50 if (epfd == -1) in setup()
62 if (epfd > 0) in cleanup()
63 SAFE_CLOSE(epfd); in cleanup()
103 res = epoll_wait(epfd, res_evs, 2, -1); in check_epoll_ctl()
137 TEST(epoll_ctl(epfd, opt, fd, epvs)); in opera_epoll_ctl()
/external/ltp/testcases/kernel/syscalls/epoll_wait/
Depoll_wait03.c45 static int page_size, fds[2], epfd, inv_epfd, bad_epfd = -1; variable
55 int *epfd; member
65 {&epfd, &ev_rdwr, -1, EINVAL},
67 {&epfd, &ev_rdwr, 0, EINVAL},
69 {&epfd, &ev_rdonly, 1, EFAULT}
111 epfd = epoll_create(1); in setup()
112 if (epfd == -1) { in setup()
119 if (epoll_ctl(epfd, EPOLL_CTL_ADD, fds[1], &epevs[0])) { in setup()
127 TEST(epoll_wait(*(tc->epfd), *(tc->ev), tc->maxevents, -1)); in verify_epoll_wait()
145 if (epfd > 0 && close(epfd)) in cleanup()
Depoll_wait02.c30 static int epfd, fds[2]; variable
40 TEST(epoll_wait(epfd, epevs, 1, sleep_ms)); in sample_fn()
57 epfd = epoll_create(1); in setup()
58 if (epfd == -1) in setup()
63 if (epoll_ctl(epfd, EPOLL_CTL_ADD, fds[0], &epevs[0])) in setup()
69 if (epfd > 0) in cleanup()
70 SAFE_CLOSE(epfd); in cleanup()
Depoll_wait01.c33 static int write_size, epfd, fds[2]; variable
75 epfd = epoll_create(3); in setup()
76 if (epfd == -1) in setup()
79 if (epoll_ctl(epfd, EPOLL_CTL_ADD, fds[0], &epevs[0]) || in setup()
80 epoll_ctl(epfd, EPOLL_CTL_ADD, fds[1], &epevs[1])) { in setup()
112 TEST(epoll_wait(epfd, &ret_evs, 1, -1)); in verify_epollout()
150 TEST(epoll_wait(epfd, &ret_evs, 1, -1)); in verify_epollin()
194 TEST(epoll_wait(epfd, ret_evs, 2, -1)); in verify_epollio()
230 if (epfd > 0) in cleanup()
231 SAFE_CLOSE(epfd); in cleanup()
/external/libevent/
Depoll.c89 int epfd; member
143 int epfd = -1; in epoll_init() local
148 epfd = epoll_create1(EPOLL_CLOEXEC); in epoll_init()
150 if (epfd == -1) { in epoll_init()
153 if ((epfd = epoll_create(32000)) == -1) { in epoll_init()
158 evutil_make_socket_closeonexec(epfd); in epoll_init()
162 close(epfd); in epoll_init()
166 epollop->epfd = epfd; in epoll_init()
172 close(epfd); in epoll_init()
200 if (epoll_ctl(epollop->epfd, EPOLL_CTL_ADD, fd, &epev) < 0) { in epoll_init()
[all …]
Depoll_sub.c52 epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) in epoll_ctl() argument
55 return (syscall(__NR_epoll_ctl, epfd, op, fd, event)); in epoll_ctl()
59 epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) in epoll_wait() argument
62 return (syscall(__NR_epoll_pwait, epfd, events, maxevents, timeout, NULL, 0)); in epoll_wait()
64 return (syscall(__NR_epoll_wait, epfd, events, maxevents, timeout)); in epoll_wait()
/external/ltp/testcases/kernel/syscalls/epoll2/src/
Depoll.c19 #define __sys_epoll_ctl(epfd, op, fd, event) _syscall4(int, epoll_ctl, \ argument
20 int, epfd, int, op, int, fd, struct epoll_event *, event)
21 #define __sys_epoll_wait(epfd, pevents, maxevents, timeout) _syscall4(int, epoll_wait, \ argument
22 int, epfd, struct epoll_event *, pevents, int, maxevents, int, timeout)
26 __sys_epoll_ctl(epfd, op, fd, event)
28 __sys_epoll_wait(epfd, pevents, maxevents, timeout)
/external/linux-kselftest/tools/testing/selftests/net/
Dreuseport_bpf_cpu.c151 void receive_on_cpu(int *rcv_fd, int len, int epfd, int cpu_id, int proto) in receive_on_cpu() argument
157 i = epoll_wait(epfd, &ev, 1, -1); in receive_on_cpu()
187 int epfd, cpu; in test() local
192 epfd = epoll_create(1); in test()
193 if (epfd < 0) in test()
198 if (epoll_ctl(epfd, EPOLL_CTL_ADD, rcv_fd[cpu], &ev)) in test()
205 receive_on_cpu(rcv_fd, len, epfd, cpu, proto); in test()
211 receive_on_cpu(rcv_fd, len, epfd, cpu, proto); in test()
217 receive_on_cpu(rcv_fd, len, epfd, cpu, proto); in test()
223 receive_on_cpu(rcv_fd, len, epfd, cpu, proto); in test()
[all …]
Dreuseport_bpf_numa.c159 void receive_on_node(int *rcv_fd, int len, int epfd, int node_id, int proto) in receive_on_node() argument
165 i = epoll_wait(epfd, &ev, 1, -1); in receive_on_node()
195 int epfd, node; in test() local
200 epfd = epoll_create(1); in test()
201 if (epfd < 0) in test()
206 if (epoll_ctl(epfd, EPOLL_CTL_ADD, rcv_fd[node], &ev)) in test()
213 receive_on_node(rcv_fd, len, epfd, node, proto); in test()
219 receive_on_node(rcv_fd, len, epfd, node, proto); in test()
222 close(epfd); in test()
Dreuseport_dualstack.c102 static int receive_once(int epfd, int proto) in receive_once() argument
108 i = epoll_wait(epfd, &ev, 1, -1); in receive_once()
131 int epfd, i, test_fd; in test() local
135 epfd = epoll_create(1); in test()
136 if (epfd < 0) in test()
142 if (epoll_ctl(epfd, EPOLL_CTL_ADD, rcv_fds[i], &ev)) in test()
148 test_fd = receive_once(epfd, proto); in test()
155 close(epfd); in test()
Dreuseport_bpf.c215 int epfd, conn, i, sport, expected; in test_recv_order() local
218 epfd = epoll_create(1); in test_recv_order()
219 if (epfd < 0) in test_recv_order()
224 if (epoll_ctl(epfd, EPOLL_CTL_ADD, fd[i], &ev)) in test_recv_order()
238 i = epoll_wait(epfd, &ev, 1, -1); in test_recv_order()
/external/ltp/testcases/kernel/syscalls/epoll_pwait/
Depoll_pwait01.c43 static int epfd, fds[2]; variable
102 epfd = epoll_create(1); in setup()
103 if (epfd == -1) { in setup()
111 if (epoll_ctl(epfd, EPOLL_CTL_ADD, fds[0], &epevs) == -1) { in setup()
164 TEST(epoll_pwait(epfd, &epevs, 1, 100, sigmask)); in do_test()
189 if (epfd > 0 && close(epfd)) in cleanup()
Depoll_pwait.h28 int epoll_pwait(int epfd, struct epoll_event *events, int maxevents, in epoll_pwait() argument
31 return ltp_syscall(__NR_epoll_pwait, epfd, events, maxevents, in epoll_pwait()
/external/ltp/testcases/kernel/syscalls/epoll2/man/
Depoll_ctl.txt11 int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event)
14 Control an epoll descriptor, epfd, by requesting the operation op be
70 Add the target file descriptor fd to the epoll descriptor epfd
80 descriptor, epfd.
87 EBADF The epfd file descriptor is not a valid file descriptor.
91 EINVAL The supplied file descriptor, epfd, is not an epoll file
Depoll_wait.txt11 int epoll_wait(int epfd, struct epoll_event * events, int maxevents,
15 Wait for events on the epoll file descriptor epfd for a maximum time of
49 EBADF epfd is not a valid file descriptor.
51 EINVAL The supplied file descriptor, epfd, is not an epoll file
/external/python/cpython2/Modules/
Dselectmodule.c730 SOCKET epfd; /* epoll control file descriptor */ member
747 if (self->epfd >= 0) { in pyepoll_internal_close()
748 int epfd = self->epfd; in pyepoll_internal_close() local
749 self->epfd = -1; in pyepoll_internal_close()
751 if (close(epfd) < 0) in pyepoll_internal_close()
780 self->epfd = epoll_create(sizehint); in newPyEpoll_Object()
784 self->epfd = fd; in newPyEpoll_Object()
786 if (self->epfd < 0) { in newPyEpoll_Object()
836 if (self->epfd < 0) in pyepoll_get_closed()
845 if (self->epfd < 0) in pyepoll_fileno()
[all …]
/external/python/cpython3/Modules/
Dselectmodule.c1226 SOCKET epfd; /* epoll control file descriptor */ member
1243 if (self->epfd >= 0) { in pyepoll_internal_close()
1244 int epfd = self->epfd; in pyepoll_internal_close() local
1245 self->epfd = -1; in pyepoll_internal_close()
1247 if (close(epfd) < 0) in pyepoll_internal_close()
1269 self->epfd = epoll_create1(flags); in newPyEpoll_Object()
1272 self->epfd = epoll_create(sizehint); in newPyEpoll_Object()
1276 self->epfd = fd; in newPyEpoll_Object()
1278 if (self->epfd < 0) { in newPyEpoll_Object()
1285 if (fd == -1 && _Py_set_inheritable(self->epfd, 0, NULL) < 0) { in newPyEpoll_Object()
[all …]
/external/libxkbcommon/xkbcommon/test/
Dinteractive-evdev.c305 int epfd; in loop() local
310 epfd = epoll_create1(0); in loop()
311 if (epfd < 0) { in loop()
321 ret = epoll_ctl(epfd, EPOLL_CTL_ADD, kbd->fd, &ev); in loop()
331 ret = epoll_wait(epfd, evs, 16, -1); in loop()
350 close(epfd); in loop()
354 close(epfd); in loop()
/external/strace/tests-mx32/
Depoll_ctl.c12 invoke_syscall(unsigned long epfd, unsigned long op, unsigned long fd, void *ev) in invoke_syscall() argument
14 return syscall(__NR_epoll_ctl, epfd, F8ILL_KULONG_MASK | op, in invoke_syscall()
/external/strace/tests-m32/
Depoll_ctl.c12 invoke_syscall(unsigned long epfd, unsigned long op, unsigned long fd, void *ev) in invoke_syscall() argument
14 return syscall(__NR_epoll_ctl, epfd, F8ILL_KULONG_MASK | op, in invoke_syscall()
/external/strace/tests/
Depoll_ctl.c12 invoke_syscall(unsigned long epfd, unsigned long op, unsigned long fd, void *ev) in invoke_syscall() argument
14 return syscall(__NR_epoll_ctl, epfd, F8ILL_KULONG_MASK | op, in invoke_syscall()
/external/compiler-rt/lib/tsan/rtl/
Dtsan_interceptors.cc1722 TSAN_INTERCEPTOR(int, epoll_ctl, int epfd, int op, int fd, void *ev) { in TSAN_INTERCEPTOR() argument
1723 SCOPED_TSAN_INTERCEPTOR(epoll_ctl, epfd, op, fd, ev); in TSAN_INTERCEPTOR()
1724 if (epfd >= 0) in TSAN_INTERCEPTOR()
1725 FdAccess(thr, pc, epfd); in TSAN_INTERCEPTOR()
1726 if (epfd >= 0 && fd >= 0) in TSAN_INTERCEPTOR()
1728 if (op == EPOLL_CTL_ADD && epfd >= 0) in TSAN_INTERCEPTOR()
1729 FdRelease(thr, pc, epfd); in TSAN_INTERCEPTOR()
1730 int res = REAL(epoll_ctl)(epfd, op, fd, ev); in TSAN_INTERCEPTOR()
1734 TSAN_INTERCEPTOR(int, epoll_wait, int epfd, void *ev, int cnt, int timeout) { in TSAN_INTERCEPTOR() argument
1735 SCOPED_TSAN_INTERCEPTOR(epoll_wait, epfd, ev, cnt, timeout); in TSAN_INTERCEPTOR()
[all …]
/external/compiler-rt/include/sanitizer/
Dlinux_syscall_hooks.h1207 #define __sanitizer_syscall_pre_epoll_ctl(epfd, op, fd, event) \ argument
1208 __sanitizer_syscall_pre_impl_epoll_ctl((long)(epfd), (long)(op), (long)(fd), \
1210 #define __sanitizer_syscall_post_epoll_ctl(res, epfd, op, fd, event) \ argument
1211 __sanitizer_syscall_post_impl_epoll_ctl(res, (long)(epfd), (long)(op), \
1213 #define __sanitizer_syscall_pre_epoll_wait(epfd, events, maxevents, timeout) \ argument
1214 __sanitizer_syscall_pre_impl_epoll_wait((long)(epfd), (long)(events), \
1216 #define __sanitizer_syscall_post_epoll_wait(res, epfd, events, maxevents, \ argument
1218 __sanitizer_syscall_post_impl_epoll_wait(res, (long)(epfd), (long)(events), \
1220 #define __sanitizer_syscall_pre_epoll_pwait(epfd, events, maxevents, timeout, \ argument
1223 (long)(epfd), (long)(events), (long)(maxevents), (long)(timeout), \
[all …]
/external/compiler-rt/lib/msan/
Dmsan_interceptors.cc879 INTERCEPTOR(int, epoll_wait, int epfd, void *events, int maxevents, in INTERCEPTOR() argument
882 int res = REAL(epoll_wait)(epfd, events, maxevents, timeout); in INTERCEPTOR()
894 INTERCEPTOR(int, epoll_pwait, int epfd, void *events, int maxevents, in INTERCEPTOR() argument
897 int res = REAL(epoll_pwait)(epfd, events, maxevents, timeout, sigmask); in INTERCEPTOR()

12