/external/ltp/testcases/kernel/syscalls/epoll_ctl/ |
D | epoll_ctl02.c | 47 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 …]
|
D | epoll_ctl01.c | 38 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/ |
D | epoll_wait03.c | 45 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()
|
D | epoll_wait02.c | 30 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()
|
D | epoll_wait01.c | 33 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/ |
D | epoll.c | 89 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 …]
|
D | epoll_sub.c | 52 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/ |
D | epoll.c | 19 #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/ |
D | reuseport_bpf_cpu.c | 151 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 …]
|
D | reuseport_bpf_numa.c | 161 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()
|
D | reuseport_dualstack.c | 102 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()
|
/external/ltp/testcases/kernel/syscalls/epoll_pwait/ |
D | epoll_pwait01.c | 43 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()
|
D | epoll_pwait.h | 28 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/grpc-grpc/test/cpp/microbenchmarks/ |
D | bm_pollset.cc | 77 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/curl/docs/examples/ |
D | ephiperfifo.c | 88 int epfd; /* epoll filedescriptor */ member 262 if(epoll_ctl(g->epfd, EPOLL_CTL_DEL, f->sockfd, NULL)) in remsock() 281 if(epoll_ctl(g->epfd, EPOLL_CTL_DEL, f->sockfd, NULL)) in setsock() 292 if(epoll_ctl(g->epfd, EPOLL_CTL_ADD, s, &ev)) in setsock() 449 epoll_ctl(g->epfd, EPOLL_CTL_ADD, sockfd, &epev); in init_fifo() 457 epoll_ctl(g->epfd, EPOLL_CTL_DEL, g->fifofd, NULL); in clean_fifo() 485 g.epfd = epoll_create1(EPOLL_CLOEXEC); in main() 486 if(g.epfd == -1) { in main() 504 epoll_ctl(g.epfd, EPOLL_CTL_ADD, g.tfd, &ev); in main() 524 err = epoll_wait(g.epfd, events, sizeof(events)/sizeof(struct epoll_event), in main()
|
/external/ltp/testcases/kernel/syscalls/epoll2/man/ |
D | epoll_ctl.txt | 11 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
|
D | epoll_wait.txt | 11 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/ |
D | selectmodule.c | 741 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/python/cpython3/Modules/ |
D | selectmodule.c | 1228 SOCKET epfd; /* epoll control file descriptor */ member 1245 if (self->epfd >= 0) { in pyepoll_internal_close() 1246 int epfd = self->epfd; in pyepoll_internal_close() local 1247 self->epfd = -1; in pyepoll_internal_close() 1249 if (close(epfd) < 0) in pyepoll_internal_close() 1269 self->epfd = epoll_create1(EPOLL_CLOEXEC); in newPyEpoll_Object() 1271 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/ |
D | interactive-evdev.c | 305 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/ |
D | epoll_ctl.c | 12 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/ |
D | epoll_ctl.c | 12 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/ |
D | epoll_ctl.c | 12 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/grpc-grpc/src/core/lib/iomgr/ |
D | ev_epollex_linux.cc | 105 int epfd; member 167 p->epfd, p->wakeup.read_fd); in pollable_desc() 550 int epfd = epoll_create1(EPOLL_CLOEXEC); local 551 if (epfd == -1) { 554 GRPC_FD_TRACE("Pollable_create: created epfd: %d (type: %d)", epfd, type); 560 epfd, type); 561 close(epfd); 569 if (epoll_ctl(epfd, EPOLL_CTL_ADD, (*p)->wakeup.read_fd, &ev) != 0) { 572 "Pollable_create: closed epfd: %d (type: %d). epoll_ctl error", epfd, 574 close(epfd); [all …]
|
/external/linux-kselftest/tools/testing/selftests/bpf/ |
D | test_select_reuseport.c | 41 static int epfd; variable 378 nev = epoll_wait(epfd, &ev, 1, expected >= PASS ? 5 : 0); in do_test() 588 epfd = epoll_create(1); in prepare_sk_fds() 589 CHECK(epfd == -1, "epoll_create(1)", in prepare_sk_fds() 590 "epfd:%d errno:%d\n", epfd, errno); in prepare_sk_fds() 595 err = epoll_ctl(epfd, EPOLL_CTL_ADD, sk_fds[i], &ev); in prepare_sk_fds() 617 close(epfd); in cleanup_per_test()
|