/third_party/ltp/testcases/kernel/syscalls/epoll_ctl/ |
D | epoll_ctl02.c | 28 static int epfd; variable 38 int *epfd; member 46 {&epfd, EPOLL_CTL_ADD, &unsupported_fd, &events[1], EPERM, "fd does not support epoll"}, 47 {&epfd, EPOLL_CTL_ADD, &inv, &events[1], EBADF, "fd is an invalid fd"}, 48 {&epfd, -1, &fd[1], &events[1], EINVAL, "op is not supported"}, 49 {&epfd, EPOLL_CTL_ADD, &epfd, &events[1], EINVAL, "fd is the same as epfd"}, 50 {&epfd, EPOLL_CTL_ADD, &fd[1], NULL, EFAULT, "events is NULL"}, 51 {&epfd, EPOLL_CTL_DEL, &fd[1], &events[1], ENOENT, "fd is not registered with EPOLL_CTL_DEL"}, 52 {&epfd, EPOLL_CTL_MOD, &fd[1], &events[1], ENOENT, "fd is not registered with EPOLL_CTL_MOD"}, 53 {&epfd, EPOLL_CTL_ADD, &fd[0], &events[0], EEXIST, "fd is already registered with EPOLL_CTL_ADD"} [all …]
|
D | epoll_ctl04.c | 21 static int epfd, new_epfd; variable 32 for (depth = 0, epfd = fd[0]; depth < MAX_DEPTH; depth++) { in setup() 37 events.data.fd = epfd; in setup() 38 if (epoll_ctl(new_epfd, EPOLL_CTL_ADD, epfd, &events)) in setup() 41 epfd = new_epfd; in setup() 60 events.data.fd = epfd; in verify_epoll_ctl() 61 TST_EXP_FAIL(epoll_ctl(new_epfd, EPOLL_CTL_ADD, epfd, &events), EINVAL, in verify_epoll_ctl()
|
D | epoll_ctl05.c | 22 static int epfd, origin_epfd, new_epfd; variable 33 for (i = 0, epfd = fd[0]; i < MAX_DEPTH; i++, epfd = new_epfd) { in setup() 41 events.data.fd = epfd; in setup() 42 if (epoll_ctl(new_epfd, EPOLL_CTL_ADD, epfd, &events)) in setup() 62 events.data.fd = epfd; in verify_epoll_ctl() 63 TST_EXP_FAIL(epoll_ctl(origin_epfd, EPOLL_CTL_ADD, epfd, &events), in verify_epoll_ctl()
|
D | epoll_ctl03.c | 23 static int epfd, fds[2]; variable 42 TST_EXP_PASS(epoll_ctl(epfd, EPOLL_CTL_MOD, fds[0], &events), in run_all() 50 epfd = epoll_create(1); in setup() 51 if (epfd == -1) in setup() 57 if (epoll_ctl(epfd, EPOLL_CTL_ADD, fds[0], &events)) in setup() 63 if (epfd) in cleanup() 64 SAFE_CLOSE(epfd); in cleanup()
|
D | epoll_ctl01.c | 25 static int epfd; variable 36 epfd = epoll_create(2); in setup() 37 if (epfd == -1) in setup() 49 if (epfd > 0) in cleanup() 50 SAFE_CLOSE(epfd); in cleanup() 90 res = epoll_wait(epfd, res_evs, 2, -1); in check_epoll_ctl() 125 TEST(epoll_ctl(epfd, opt, fd, epvs)); in opera_epoll_ctl()
|
/third_party/ltp/testcases/kernel/syscalls/epoll_wait/ |
D | epoll_wait03.c | 31 static int fds[2], epfd, inv_epfd, bad_epfd = -1; variable 34 int *epfd; member 42 {&epfd, &ev_rdwr, -1, EINVAL, "maxevents is less than zero"}, 43 {&epfd, &ev_rdwr, 0, EINVAL, "maxevents is equal to zero"}, 44 {&epfd, &ev_rdonly, 1, EFAULT, "events has no write permissions"} 53 epfd = epoll_create(1); in setup() 54 if (epfd == -1) in setup() 59 if (epoll_ctl(epfd, EPOLL_CTL_ADD, fds[1], &epevs[0])) in setup() 65 TST_EXP_FAIL(epoll_wait(*tc[n].epfd, *tc[n].ev, tc[n].maxevents, -1), in verify_epoll_wait() 71 if (epfd > 0) in cleanup() [all …]
|
D | epoll_wait07.c | 20 static int epfd; variable 24 if (epfd > 0) in cleanup() 25 SAFE_CLOSE(epfd); in cleanup() 43 epfd = SAFE_EPOLL_CREATE1(0); in run() 45 SAFE_EPOLL_CTL(epfd, EPOLL_CTL_ADD, fds[0], &((struct epoll_event) { in run() 53 TST_EXP_EQ_LI(SAFE_EPOLL_WAIT(epfd, &evt_receive, 10, 0), 1); in run() 58 TST_EXP_EQ_LI(SAFE_EPOLL_WAIT(epfd, &evt_receive, 10, 0), 0); in run() 63 TST_EXP_EQ_LI(SAFE_EPOLL_WAIT(epfd, &evt_receive, 10, 0), 0); in run() 65 SAFE_CLOSE(epfd); in run()
|
D | epoll_wait06.c | 33 static int epfd; variable 48 if (epfd > 0) in cleanup() 49 SAFE_CLOSE(epfd); in cleanup() 65 epfd = SAFE_EPOLL_CREATE1(0); in run() 67 SAFE_EPOLL_CTL(epfd, EPOLL_CTL_ADD, fds[0], &((struct epoll_event) { in run() 71 SAFE_EPOLL_CTL(epfd, EPOLL_CTL_ADD, fds[1], &((struct epoll_event) { in run() 82 TST_EXP_EQ_LI(SAFE_EPOLL_WAIT(epfd, &evt_receive, 1, 0), 1); in run() 91 TST_EXP_EQ_LI(SAFE_EPOLL_WAIT(epfd, &evt_receive, 1, 0), 0); in run() 98 TST_EXP_EQ_LI(SAFE_EPOLL_WAIT(epfd, &evt_receive, 1, 0), 1); in run()
|
D | epoll_wait04.c | 20 static int epfd, fds[2]; variable 28 TEST(epoll_wait(epfd, epevs, 1, 0)); in run() 45 epfd = epoll_create(1); in setup() 46 if (epfd == -1) in setup() 51 if (epoll_ctl(epfd, EPOLL_CTL_ADD, fds[0], &epevs[0])) in setup() 57 if (epfd > 0) in cleanup() 58 SAFE_CLOSE(epfd); in cleanup()
|
D | epoll_wait02.c | 20 static int epfd, fds[2]; variable 30 TEST(epoll_wait(epfd, epevs, 1, sleep_ms)); in sample_fn() 46 epfd = epoll_create(1); in setup() 47 if (epfd == -1) in setup() 52 if (epoll_ctl(epfd, EPOLL_CTL_ADD, fds[0], &epevs[0])) in setup() 58 if (epfd > 0) in cleanup() 59 SAFE_CLOSE(epfd); in cleanup()
|
D | epoll_wait01.c | 22 static int write_size, epfd, fds[2]; variable 65 epfd = epoll_create(3); in setup() 66 if (epfd == -1) in setup() 70 if (epoll_ctl(epfd, EPOLL_CTL_ADD, fds[0], &epevs[0]) || in setup() 71 epoll_ctl(epfd, EPOLL_CTL_ADD, fds[1], &epevs[1])) { in setup() 103 TEST(epoll_wait(epfd, &ret_evs, 1, -1)); in verify_epollout() 141 TEST(epoll_wait(epfd, &ret_evs, 1, -1)); in verify_epollin() 185 TEST(epoll_wait(epfd, ret_evs, 2, -1)); in verify_epollio() 221 if (epfd > 0) in cleanup() 222 SAFE_CLOSE(epfd); in cleanup()
|
D | epoll_wait05.c | 17 static int epfd; variable 74 epfd = SAFE_EPOLL_CREATE1(0); in run() 76 SAFE_EPOLL_CTL(epfd, EPOLL_CTL_ADD, sockfd_client, &evt_req); in run() 81 ret = SAFE_EPOLL_WAIT(epfd, &evt_rec, 1, 2000); in run() 93 SAFE_CLOSE(epfd); in run() 116 if (fcntl(epfd, F_GETFD) > 0) in cleanup() 117 SAFE_CLOSE(epfd); in cleanup()
|
/third_party/alsa-utils/alsactl/ |
D | monitor.c | 241 static int operate_dispatcher(int epfd, uint32_t op, struct epoll_event *epev, in operate_dispatcher() argument 264 err = epoll_ctl(epfd, op, pfds[i].fd, epev); in operate_dispatcher() 273 static int prepare_dispatcher(int epfd, int sigfd, int infd, in prepare_dispatcher() argument 282 if (epoll_ctl(epfd, EPOLL_CTL_ADD, sigfd, &ev) < 0) in prepare_dispatcher() 287 if (epoll_ctl(epfd, EPOLL_CTL_ADD, infd, &ev) < 0) in prepare_dispatcher() 293 err = operate_dispatcher(epfd, EPOLL_CTL_ADD, &ev, entry); in prepare_dispatcher() 301 static int run_dispatcher(int epfd, int sigfd, int infd, struct list_head *srcs, in run_dispatcher() argument 321 count = epoll_wait(epfd, epev, max_ev_count, -1); in run_dispatcher() 348 operate_dispatcher(epfd, EPOLL_CTL_DEL, NULL, entry); in run_dispatcher() 358 static void clear_dispatcher(int epfd, int sigfd, int infd, in clear_dispatcher() argument [all …]
|
/third_party/alsa-utils/axfer/ |
D | waiter-epoll.c | 20 int epfd; member 35 state->epfd = epoll_create(1); in epoll_prepare() 36 if (state->epfd < 0) in epoll_prepare() 44 if (epoll_ctl(state->epfd, EPOLL_CTL_ADD, ev.data.fd, &ev) < 0) in epoll_prepare() 59 err = epoll_wait(state->epfd, state->events, state->ev_count, in epoll_wait_event() 88 epoll_ctl(state->epfd, EPOLL_CTL_DEL, fd, NULL); in epoll_release() 94 close(state->epfd); in epoll_release() 97 state->epfd = 0; in epoll_release()
|
/third_party/ltp/include/ |
D | tst_epoll.h | 24 int epfd, int op, int fd, struct epoll_event *ev); 26 #define SAFE_EPOLL_CTL(epfd, op, fd, ev) \ argument 27 safe_epoll_ctl(__FILE__, __LINE__, epfd, op, fd, ev) 30 int epfd, struct epoll_event *events, 33 #define SAFE_EPOLL_WAIT(epfd, events, maxevents, timeout)\ argument 34 safe_epoll_wait(__FILE__, __LINE__, epfd, events, maxevents, timeout)
|
/third_party/ltp/lib/ |
D | tst_epoll.c | 37 int epfd, int op, int fd, struct epoll_event *ev) in safe_epoll_ctl() argument 56 ret = epoll_ctl(epfd, op, fd, ev); in safe_epoll_ctl() 61 "epoll_ctl(%d, %s, %d, ...", epfd, op_str, fd); in safe_epoll_ctl() 68 int epfd, struct epoll_event *events, in safe_epoll_wait() argument 71 int ret = epoll_wait(epfd, events, maxevents, timeout); in safe_epoll_wait() 76 epfd, maxevents, timeout); in safe_epoll_wait()
|
/third_party/ltp/include/lapi/ |
D | epoll.h | 24 static inline int epoll_pwait(int epfd, struct epoll_event *events, in epoll_pwait() argument 28 return tst_syscall(__NR_epoll_pwait, epfd, events, maxevents, in epoll_pwait() 40 static inline int epoll_pwait2(int epfd, struct epoll_event *events, in epoll_pwait2() argument 45 return tst_syscall(__NR_epoll_pwait2, epfd, events, maxevents, in epoll_pwait2() 53 return tst_syscall(__NR_epoll_pwait2, epfd, events, maxevents, in epoll_pwait2()
|
/third_party/ltp/testcases/kernel/syscalls/epoll_pwait/ |
D | epoll_pwait_var.h | 16 static int do_epoll_pwait(int epfd, struct epoll_event *events, int in do_epoll_pwait() argument 20 return epoll_pwait(epfd, events, maxevents, timeout, sigmask); in do_epoll_pwait() 25 return epoll_pwait2(epfd, events, maxevents, NULL, sigmask); in do_epoll_pwait() 31 return epoll_pwait2(epfd, events, maxevents, &ts, sigmask); in do_epoll_pwait()
|
/third_party/rust/crates/nix/src/sys/ |
D | epoll.rs | 89 epfd: RawFd, in epoll_ctl() 103 libc::epoll_ctl(epfd, op as c_int, fd, &mut event.event) in epoll_ctl() 105 libc::epoll_ctl(epfd, op as c_int, fd, ptr::null_mut()) in epoll_ctl() 114 epfd: RawFd, in epoll_wait() 120 epfd, in epoll_wait()
|
/third_party/curl/docs/examples/ |
D | ephiperfifo.c | 84 int epfd; /* epoll filedescriptor */ member 257 if(epoll_ctl(g->epfd, EPOLL_CTL_DEL, f->sockfd, NULL)) in remsock() 276 if(epoll_ctl(g->epfd, EPOLL_CTL_DEL, f->sockfd, NULL)) in setsock() 287 if(epoll_ctl(g->epfd, EPOLL_CTL_ADD, s, &ev)) in setsock() 444 epoll_ctl(g->epfd, EPOLL_CTL_ADD, sockfd, &epev); in init_fifo() 452 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()
|
/third_party/python/Modules/ |
D | selectmodule.c | 1223 SOCKET epfd; /* epoll control file descriptor */ member 1237 if (self->epfd >= 0) { in pyepoll_internal_close() 1238 int epfd = self->epfd; in pyepoll_internal_close() local 1239 self->epfd = -1; in pyepoll_internal_close() 1241 if (close(epfd) < 0) in pyepoll_internal_close() 1262 self->epfd = epoll_create1(EPOLL_CLOEXEC); in newPyEpoll_Object() 1264 self->epfd = epoll_create(sizehint); in newPyEpoll_Object() 1269 self->epfd = fd; in newPyEpoll_Object() 1271 if (self->epfd < 0) { in newPyEpoll_Object() 1278 if (fd == -1 && _Py_set_inheritable(self->epfd, 0, NULL) < 0) { in newPyEpoll_Object() [all …]
|
/third_party/rust/crates/rustix/src/backend/linux_raw/io/ |
D | syscalls.rs | 569 epfd: BorrowedFd<'_>, in epoll_add() 575 epfd, in epoll_add() 584 epfd: BorrowedFd<'_>, in epoll_mod() 590 epfd, in epoll_mod() 598 pub(crate) unsafe fn epoll_del(epfd: BorrowedFd<'_>, fd: c::c_int) -> io::Result<()> { in epoll_del() 601 epfd, in epoll_del() 610 epfd: BorrowedFd<'_>, in epoll_wait() 619 epfd, in epoll_wait() 629 epfd, in epoll_wait()
|
/third_party/lwip/ |
D | 0034-add-accept4-and-epoll_create1.patch | 177 int (*epoll_ctl_fn)(int epfd, int op, int fd, struct epoll_event *event); 178 int (*epoll_wait_fn)(int epfd, struct epoll_event *events, int maxevents, int timeout); 179 int (*epoll_close_fn)(int epfd);
|
/third_party/libcoap/include/coap3/ |
D | coap_net_internal.h | 174 int epfd; /**< External FD for epoll */ member
|
/third_party/libcoap/src/ |
D | coap_net.c | 456 return context->epfd; in coap_context_get_coap_fd() 492 c->epfd = epoll_create1(0); in coap_new_context() 493 if (c->epfd == -1) { in coap_new_context() 499 if (c->epfd != -1) { in coap_new_context() 516 ret = epoll_ctl(c->epfd, EPOLL_CTL_ADD, c->eptimerfd, &event); in coap_new_context() 635 ret = epoll_ctl(context->epfd, EPOLL_CTL_DEL, context->eptimerfd, &event); in coap_free_context() 644 if (context->epfd != -1) { in coap_free_context() 645 close(context->epfd); in coap_free_context() 646 context->epfd = -1; in coap_free_context()
|