Home
last modified time | relevance | path

Searched refs:epfd (Results 1 - 25 of 29) sorted by relevance

12

/third_party/ltp/testcases/kernel/syscalls/epoll_ctl/
H A Depoll_ctl02.c12 * - EBADF if epfd is an invalid fd.
16 * - EINVAL if fd is the same as epfd.
28 static int epfd; variable
38 int *epfd; member
45 {&inv, EPOLL_CTL_ADD, &fd[1], &events[1], EBADF, "epfd is an invalid fd"},
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,
[all...]
H A Depoll_ctl04.c21 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()
H A Depoll_ctl03.c23 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()
H A Depoll_ctl05.c22 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()
H A Depoll_ctl01.c25 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/
H A Depoll_wait03.c13 * - epoll_wait fails with EBADF if epfd is not a valid file descriptor.
14 * - epoll_wait fails with EINVAL if epfd is not an epoll file descriptor.
31 static int fds[2], epfd, inv_epfd, bad_epfd = -1; variable
34 int *epfd; member
40 {&bad_epfd, &ev_rdwr, 1, EBADF, "epfd is not a valid fd"},
41 {&inv_epfd, &ev_rdwr, 1, EINVAL, "epfd is not an epoll fd"},
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 in setup()
[all...]
H A Depoll_wait07.c20 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()
H A Depoll_wait06.c33 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()
H A Depoll_wait02.c20 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()
H A Depoll_wait04.c20 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()
H A Depoll_wait01.c22 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()
[all...]
H A Depoll_wait05.c17 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/
H A Dmonitor.c242 static int operate_dispatcher(int epfd, uint32_t op, struct epoll_event *epev, in operate_dispatcher() argument
265 err = epoll_ctl(epfd, op, pfds[i].fd, epev); in operate_dispatcher()
274 static int prepare_dispatcher(int epfd, int sigfd, int infd, in prepare_dispatcher() argument
283 if (epoll_ctl(epfd, EPOLL_CTL_ADD, sigfd, &ev) < 0) in prepare_dispatcher()
288 if (epoll_ctl(epfd, EPOLL_CTL_ADD, infd, &ev) < 0) in prepare_dispatcher()
294 err = operate_dispatcher(epfd, EPOLL_CTL_ADD, &ev, entry); in prepare_dispatcher()
302 static int run_dispatcher(int epfd, int sigfd, int infd, struct list_head *srcs, in run_dispatcher() argument
322 count = epoll_wait(epfd, epev, max_ev_count, -1); in run_dispatcher()
349 operate_dispatcher(epfd, EPOLL_CTL_DEL, NULL, entry); in run_dispatcher()
359 static void clear_dispatcher(int epfd, in argument
396 int epfd; monitor() local
[all...]
/third_party/ltp/include/
H A Dtst_epoll.h24 int epfd, int op, int fd, struct epoll_event *ev);
26 #define SAFE_EPOLL_CTL(epfd, op, fd, ev) \
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)\
34 safe_epoll_wait(__FILE__, __LINE__, epfd, events, maxevents, timeout)
/third_party/ltp/lib/
H A Dtst_epoll.c37 int epfd, int op, int fd, struct epoll_event *ev) in safe_epoll_ctl()
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()
71 int ret = epoll_wait(epfd, events, maxevents, timeout); in safe_epoll_wait()
76 epfd, maxevents, timeout); in safe_epoll_wait()
36 safe_epoll_ctl(const char *const file, const int lineno, int epfd, int op, int fd, struct epoll_event *ev) safe_epoll_ctl() argument
67 safe_epoll_wait(const char *const file, const int lineno, int epfd, struct epoll_event *events, int maxevents, int timeout) safe_epoll_wait() argument
/third_party/alsa-utils/axfer/
H A Dwaiter-epoll.c20 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/lapi/
H A Depoll.h24 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/
H A Depoll_pwait_var.h16 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/curl/docs/examples/
H A Dephiperfifo.c84 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, event in main()
[all...]
/third_party/rust/crates/nix/src/sys/
H A Depoll.rs89 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/python/Modules/
H A Dselectmodule.c1244 SOCKET epfd; /* epoll control file descriptor */ member
1258 if (self->epfd >= 0) { in pyepoll_internal_close()
1259 int epfd = self->epfd; in pyepoll_internal_close() local
1260 self->epfd = -1; in pyepoll_internal_close()
1262 if (close(epfd) < 0) in pyepoll_internal_close()
1283 self->epfd = epoll_create1(EPOLL_CLOEXEC); in newPyEpoll_Object()
1285 self->epfd = epoll_create(sizehint); in newPyEpoll_Object()
1290 self->epfd = fd; in newPyEpoll_Object()
1292 if (self->epfd < in newPyEpoll_Object()
1424 pyepoll_internal_ctl(int epfd, int op, int fd, unsigned int events) pyepoll_internal_ctl() argument
[all...]
/third_party/rust/crates/rustix/src/backend/linux_raw/io/
H A Dsyscalls.rs569 epfd: BorrowedFd<'_>,
575 epfd,
584 epfd: BorrowedFd<'_>,
590 epfd,
598 pub(crate) unsafe fn epoll_del(epfd: BorrowedFd<'_>, fd: c::c_int) -> io::Result<()> {
601 epfd,
610 epfd: BorrowedFd<'_>,
619 epfd,
629 epfd,
/third_party/libcoap/include/coap3/
H A Dcoap_net_internal.h174 int epfd; /**< External FD for epoll */ member
/third_party/libcoap/src/
H A Dcoap_net.c456 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()
H A Dcoap_io.c499 ret = epoll_ctl(context->epfd, EPOLL_CTL_DEL, sock->fd, &event);
563 ret = epoll_ctl(context->epfd, EPOLL_CTL_ADD, sock->fd, &event);
598 ret = epoll_ctl(context->epfd, EPOLL_CTL_MOD, sock->fd, &event);
1751 nfds = epoll_wait(ctx->epfd, events, COAP_MAX_EPOLL_EVENTS, etimeout);

Completed in 15 milliseconds

12