Home
last modified time | relevance | path

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

12

/external/ltp/testcases/kernel/syscalls/epoll_ctl/
Depoll_ctl02.c37 static int epfd; variable
54 {&epfd, EPOLL_CTL_ADD, &inv, &events[1], EBADF},
55 {&epfd, -1, &fd[1], &events[1], EINVAL},
56 {&epfd, EPOLL_CTL_ADD, &epfd, &events[1], EINVAL},
57 {&epfd, EPOLL_CTL_DEL, &fd[1], &events[1], ENOENT},
58 {&epfd, EPOLL_CTL_MOD, &fd[1], &events[1], ENOENT},
59 {&epfd, EPOLL_CTL_ADD, &fd[0], &events[0], EEXIST}
64 epfd = epoll_create(2); in setup()
65 if (epfd == -1) in setup()
73 TEST(epoll_ctl(epfd, EPOLL_CTL_ADD, fd[0], &events[0])); in setup()
[all …]
Depoll_ctl01.c28 static int epfd; variable
39 epfd = epoll_create(2); in setup()
40 if (epfd == -1) in setup()
52 if (epfd > 0) in cleanup()
53 SAFE_CLOSE(epfd); in cleanup()
93 res = epoll_wait(epfd, res_evs, 2, -1); in check_epoll_ctl()
127 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.c21 static int write_size, epfd, fds[2]; variable
63 epfd = epoll_create(3); in setup()
64 if (epfd == -1) in setup()
67 if (epoll_ctl(epfd, EPOLL_CTL_ADD, fds[0], &epevs[0]) || in setup()
68 epoll_ctl(epfd, EPOLL_CTL_ADD, fds[1], &epevs[1])) { in setup()
100 TEST(epoll_wait(epfd, &ret_evs, 1, -1)); in verify_epollout()
138 TEST(epoll_wait(epfd, &ret_evs, 1, -1)); in verify_epollin()
182 TEST(epoll_wait(epfd, ret_evs, 2, -1)); in verify_epollio()
218 if (epfd > 0) in cleanup()
219 SAFE_CLOSE(epfd); in cleanup()
/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/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/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/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.c161 void receive_on_node(int *rcv_fd, int len, int epfd, int node_id, int proto) in receive_on_node() argument
167 i = epoll_wait(epfd, &ev, 1, -1); in receive_on_node()
197 int epfd, node; in test() local
202 epfd = epoll_create(1); in test()
203 if (epfd < 0) in test()
208 if (epoll_ctl(epfd, EPOLL_CTL_ADD, rcv_fd[node], &ev)) in test()
215 receive_on_node(rcv_fd, len, epfd, node, proto); in test()
221 receive_on_node(rcv_fd, len, epfd, node, proto); in test()
224 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()
156 close(epfd); in test()
Dreuseport_addr_any.c164 static int receive_once(int epfd, int proto) in receive_once() argument
170 i = epoll_wait(epfd, &ev, 1, 3); in receive_once()
193 int epfd, i, send_fd, recv_fd; in test() local
195 epfd = epoll_create(1); in test()
196 if (epfd < 0) in test()
202 if (epoll_ctl(epfd, EPOLL_CTL_ADD, rcv_fds[i], &ev)) in test()
208 recv_fd = receive_once(epfd, proto); in test()
213 close(epfd); in test()
Dtcp_fastopen_backup_key.c249 int fd, epfd; in run_one_test() local
253 epfd = epoll_create(1); in run_one_test()
254 if (epfd < 0) in run_one_test()
259 if (epoll_ctl(epfd, EPOLL_CTL_ADD, rcv_fds[i], &ev)) in run_one_test()
270 i = epoll_wait(epfd, &ev, 1, -1); in run_one_test()
278 if (epoll_ctl(epfd, EPOLL_CTL_ADD, fd, &ev)) in run_one_test()
285 if (epoll_ctl(epfd, EPOLL_CTL_DEL, ev.data.fd, NULL)) in run_one_test()
/external/grpc-grpc/test/cpp/microbenchmarks/
Dbm_pollset.cc77 int epfd = epoll_create1(0); in BM_PollEmptyPollset_SpeedOfLight() local
78 GPR_ASSERT(epfd != -1); in BM_PollEmptyPollset_SpeedOfLight()
87 epoll_ctl(epfd, EPOLL_CTL_ADD, fds.back(), &ev); in BM_PollEmptyPollset_SpeedOfLight()
90 epoll_wait(epfd, ev, nev, 0); in BM_PollEmptyPollset_SpeedOfLight()
95 close(epfd); in BM_PollEmptyPollset_SpeedOfLight()
187 int epfd = epoll_create1(0); in BM_SingleThreadPollOneFd_SpeedOfLight() local
188 GPR_ASSERT(epfd != -1); in BM_SingleThreadPollOneFd_SpeedOfLight()
192 epoll_ctl(epfd, EPOLL_CTL_ADD, fd, &ev[0]); in BM_SingleThreadPollOneFd_SpeedOfLight()
200 err = epoll_wait(epfd, ev, GPR_ARRAY_SIZE(ev), 0); in BM_SingleThreadPollOneFd_SpeedOfLight()
210 close(epfd); in BM_SingleThreadPollOneFd_SpeedOfLight()
/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/curl/docs/examples/
Dephiperfifo.c82 int epfd; /* epoll filedescriptor */ member
255 if(epoll_ctl(g->epfd, EPOLL_CTL_DEL, f->sockfd, NULL)) in remsock()
274 if(epoll_ctl(g->epfd, EPOLL_CTL_DEL, f->sockfd, NULL)) in setsock()
285 if(epoll_ctl(g->epfd, EPOLL_CTL_ADD, s, &ev)) in setsock()
442 epoll_ctl(g->epfd, EPOLL_CTL_ADD, sockfd, &epev); in init_fifo()
450 epoll_ctl(g->epfd, EPOLL_CTL_DEL, g->fifofd, NULL); in clean_fifo()
478 g.epfd = epoll_create1(EPOLL_CLOEXEC); in main()
479 if(g.epfd == -1) { in main()
497 epoll_ctl(g.epfd, EPOLL_CTL_ADD, g.tfd, &ev); in main()
515 int err = epoll_wait(g.epfd, events, in main()
/external/python/cpython3/Modules/
Dselectmodule.c1201 SOCKET epfd; /* epoll control file descriptor */ member
1218 if (self->epfd >= 0) { in pyepoll_internal_close()
1219 int epfd = self->epfd; in pyepoll_internal_close() local
1220 self->epfd = -1; in pyepoll_internal_close()
1222 if (close(epfd) < 0) in pyepoll_internal_close()
1242 self->epfd = epoll_create1(EPOLL_CLOEXEC); in newPyEpoll_Object()
1244 self->epfd = epoll_create(sizehint); in newPyEpoll_Object()
1249 self->epfd = fd; in newPyEpoll_Object()
1251 if (self->epfd < 0) { in newPyEpoll_Object()
1258 if (fd == -1 && _Py_set_inheritable(self->epfd, 0, NULL) < 0) { in newPyEpoll_Object()
[all …]
/external/linux-kselftest/tools/testing/selftests/bpf/
Dtest_sock_fields.c310 int listen_fd, cli_fd, accept_fd, epfd, err; in test() local
318 epfd = epoll_create(1); in test()
319 CHECK(epfd == -1, "epoll_create()", "epfd:%d errno:%d", epfd, errno); in test()
363 err = epoll_ctl(epfd, EPOLL_CTL_ADD, listen_fd, &ev); in test()
369 err = epoll_wait(epfd, &ev, 1, 1000); in test()
381 err = epoll_ctl(epfd, EPOLL_CTL_ADD, cli_fd, &ev); in test()
394 err = epoll_wait(epfd, &ev, 1, 1000); in test()
405 close(epfd); in test()
/external/python/cpython2/Modules/
Dselectmodule.c741 SOCKET epfd; /* epoll control file descriptor */ member
758 if (self->epfd >= 0) { in pyepoll_internal_close()
759 int epfd = self->epfd; in pyepoll_internal_close() local
760 self->epfd = -1; in pyepoll_internal_close()
762 if (close(epfd) < 0) in pyepoll_internal_close()
791 self->epfd = epoll_create(sizehint); in newPyEpoll_Object()
795 self->epfd = fd; in newPyEpoll_Object()
797 if (self->epfd < 0) { in newPyEpoll_Object()
847 if (self->epfd < 0) in pyepoll_get_closed()
856 if (self->epfd < 0) in pyepoll_fileno()
[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()

12