Home
last modified time | relevance | path

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

/third_party/ltp/testcases/kernel/syscalls/epoll_ctl/
Depoll_ctl02.c28 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 …]
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()
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()
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()
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/
Depoll_wait03.c31 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 …]
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()
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()
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()
/third_party/alsa-utils/alsactl/
Dmonitor.c241 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/
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/
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/grpc/test/cpp/microbenchmarks/
Dbm_pollset.cc76 int epfd = epoll_create1(0); in BM_PollEmptyPollset_SpeedOfLight() local
77 GPR_ASSERT(epfd != -1); in BM_PollEmptyPollset_SpeedOfLight()
86 epoll_ctl(epfd, EPOLL_CTL_ADD, fds.back(), &ev); in BM_PollEmptyPollset_SpeedOfLight()
89 epoll_wait(epfd, ev, nev, 0); in BM_PollEmptyPollset_SpeedOfLight()
94 close(epfd); in BM_PollEmptyPollset_SpeedOfLight()
184 int epfd = epoll_create1(0); in BM_SingleThreadPollOneFd_SpeedOfLight() local
185 GPR_ASSERT(epfd != -1); in BM_SingleThreadPollOneFd_SpeedOfLight()
189 epoll_ctl(epfd, EPOLL_CTL_ADD, fd, &ev[0]); in BM_SingleThreadPollOneFd_SpeedOfLight()
197 err = epoll_wait(epfd, ev, GPR_ARRAY_SIZE(ev), 0); in BM_SingleThreadPollOneFd_SpeedOfLight()
207 close(epfd); in BM_SingleThreadPollOneFd_SpeedOfLight()
/third_party/ltp/testcases/kernel/syscalls/epoll_pwait/
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/
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()
/third_party/grpc/src/core/lib/iomgr/
Dev_epollex_linux.cc95 int epfd; member
129 pollable_type_string(p->type), p->epfd, in pollable_desc()
148 GRPC_FD_TRACE("pollable_unref: Closing epfd: %d", p->epfd); in pollable_unref()
149 close(p->epfd); in pollable_unref()
474 epoll_ctl(pollable_obj->epfd, EPOLL_CTL_DEL, fd->fd, &ev_fd);
477 const int epfd = fd->pollset_fds[i]; local
478 epoll_ctl(epfd, EPOLL_CTL_DEL, fd->fd, &ev_fd);
539 const int epfd = pollset->active_pollable->epfd; local
542 if (fd->pollset_fds[i] == epfd) {
550 const int epfd = pollset->active_pollable->epfd; local
[all …]
Dev_epoll1_linux.cc81 int epfd; member
117 g_epoll_set.epfd = epoll_create_and_cloexec(); in epoll_set_init()
118 if (g_epoll_set.epfd < 0) { in epoll_set_init()
122 gpr_log(GPR_INFO, "grpc epoll fd: %d", g_epoll_set.epfd); in epoll_set_init()
130 if (g_epoll_set.epfd >= 0) { in epoll_set_shutdown()
131 close(g_epoll_set.epfd); in epoll_set_shutdown()
132 g_epoll_set.epfd = -1; in epoll_set_shutdown()
373 if (epoll_ctl(g_epoll_set.epfd, EPOLL_CTL_ADD, fd, &ev) != 0) { in fd_create()
393 if (epoll_ctl(g_epoll_set.epfd, EPOLL_CTL_DEL, fd->fd, &dummy_event) != in fd_shutdown_internal()
527 if (epoll_ctl(g_epoll_set.epfd, EPOLL_CTL_ADD, global_wakeup_fd.read_fd, in pollset_global_init()
[all …]
/third_party/python/Modules/
Dselectmodule.c1223 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/libcoap/include/coap3/
Dcoap_net_internal.h140 int epfd; /**< External FD for epoll */ member
/third_party/libcoap/src/
Dnet.c497 return context->epfd; in coap_context_get_coap_fd()
536 c->epfd = epoll_create1(0); in coap_new_context()
537 if (c->epfd == -1) { in coap_new_context()
543 if (c->epfd != -1) { in coap_new_context()
561 ret = epoll_ctl(c->epfd, EPOLL_CTL_ADD, c->eptimerfd, &event); in coap_new_context()
675 ret = epoll_ctl(context->epfd, EPOLL_CTL_DEL, context->eptimerfd, &event); in coap_free_context()
685 if (context->epfd != -1) { in coap_free_context()
686 close(context->epfd); in coap_free_context()
687 context->epfd = -1; in coap_free_context()
Dcoap_io.c462 ret = epoll_ctl(context->epfd, EPOLL_CTL_DEL, sock->fd, &event);
500 ret = epoll_ctl(context->epfd, EPOLL_CTL_MOD, sock->fd, &event);
1531 nfds = epoll_wait(ctx->epfd, events, COAP_MAX_EPOLL_EVENTS, etimeout);
Dcoap_session.c801 ret = epoll_ctl(context->epfd, EPOLL_CTL_ADD, sock->fd, &event); in coap_epoll_ctl_add()