/external/ltp/testcases/kernel/syscalls/epoll_ctl/ |
epoll_ctl01.c | 38 static int epfd; variable 49 epfd = epoll_create(2); 50 if (epfd == -1) 62 if (epfd > 0) 63 SAFE_CLOSE(epfd); 99 res = epoll_wait(epfd, res_evs, 2, -1); 135 TEST(epoll_ctl(epfd, opt, fd, epvs));
|
epoll_ctl02.c | 21 * 1) epoll_ctl(2) fails if epfd is a invalid file descriptor. 24 * 4) epoll_ctl(2) fails if fd is the same as epfd. 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 [all...] |
/external/ltp/testcases/kernel/syscalls/epoll_wait/ |
epoll_wait02.c | 34 static int epfd, fds[2]; variable 73 TEST(epoll_wait(epfd, epevs, 1, sleep_ms)); 116 epfd = epoll_create(1); 117 if (epfd == -1) { 124 if (epoll_ctl(epfd, EPOLL_CTL_ADD, fds[0], &epevs[0])) { 132 if (epfd > 0 && close(epfd)) 133 tst_resm(TWARN | TERRNO, "failed to close epfd");
|
epoll_wait01.c | 37 static int write_size, epfd, fds[2], fds2[2]; variable 84 epfd = epoll_create(3); 85 if (epfd == -1) { 94 if (epoll_ctl(epfd, EPOLL_CTL_ADD, fds[0], &epevs[0]) || 95 epoll_ctl(epfd, EPOLL_CTL_ADD, fds[1], &epevs[1]) || 96 epoll_ctl(epfd, EPOLL_CTL_ADD, fds2[0], &epevs[2])) { 131 TEST(epoll_wait(epfd, epevs, 3, -1)); 168 TEST(epoll_wait(epfd, epevs, 3, -1)); 206 TEST(epoll_wait(epfd, epevs, 3, -1)); 264 if (epfd > 0 && close(epfd) [all...] |
epoll_wait03.c | 21 * 1) epoll_wait(2) fails if epfd is not a valid file descriptor 22 * 2) epoll_wait(2) fails if epfd is not an epoll file descriptor 45 static int page_size, fds[2], epfd, inv_epfd, bad_epfd = -1; variable 55 int *epfd; member in struct:test_case_t 65 {&epfd, &ev_rdwr, -1, EINVAL}, 67 {&epfd, &ev_rdwr, 0, EINVAL}, 69 {&epfd, &ev_rdonly, 1, EFAULT} 111 epfd = epoll_create(1); 112 if (epfd == -1) { 119 if (epoll_ctl(epfd, EPOLL_CTL_ADD, fds[1], &epevs[0])) [all...] |
/libcore/ojluni/src/main/native/ |
EPoll.c | 63 int epfd = epoll_create(256); local 64 if (epfd < 0) { 67 return epfd; 71 Java_sun_nio_ch_EPoll_epollCtl(JNIEnv *env, jclass c, jint epfd, 80 RESTARTABLE(epoll_ctl(epfd, (int)opcode, (int)fd, &event), res); 87 jint epfd, jlong address, jint numfds) 92 RESTARTABLE(epoll_wait(epfd, events, numfds, -1), res); 100 Java_sun_nio_ch_EPoll_close0(JNIEnv *env, jclass c, jint epfd) { 102 RESTARTABLE(close(epfd), res);
|
/prebuilts/go/darwin-x86/src/runtime/ |
netpoll_epoll.go | 15 func epollctl(epfd, op, fd int32, ev *epollevent) int32 18 func epollwait(epfd int32, ev *epollevent, nev, timeout int32) int32 22 epfd int32 = -1 // epoll descriptor 26 epfd = epollcreate1(_EPOLL_CLOEXEC) 27 if epfd >= 0 { 30 epfd = epollcreate(1024) 31 if epfd >= 0 { 32 closeonexec(epfd) 35 println("netpollinit: failed to create epoll descriptor", -epfd) 43 return -epollctl(epfd, _EPOLL_CTL_ADD, int32(fd), &ev 21 epfd int32 = -1 \/\/ epoll descriptor var [all...] |
/prebuilts/go/linux-x86/src/runtime/ |
netpoll_epoll.go | 15 func epollctl(epfd, op, fd int32, ev *epollevent) int32 18 func epollwait(epfd int32, ev *epollevent, nev, timeout int32) int32 22 epfd int32 = -1 // epoll descriptor 26 epfd = epollcreate1(_EPOLL_CLOEXEC) 27 if epfd >= 0 { 30 epfd = epollcreate(1024) 31 if epfd >= 0 { 32 closeonexec(epfd) 35 println("netpollinit: failed to create epoll descriptor", -epfd) 43 return -epollctl(epfd, _EPOLL_CTL_ADD, int32(fd), &ev 21 epfd int32 = -1 \/\/ epoll descriptor var [all...] |
/external/ltp/testcases/kernel/syscalls/epoll_pwait/ |
epoll_pwait01.c | 43 static int epfd, fds[2]; variable 102 epfd = epoll_create(1); 103 if (epfd == -1) { 111 if (epoll_ctl(epfd, EPOLL_CTL_ADD, fds[0], &epevs) == -1) { 164 TEST(epoll_pwait(epfd, &epevs, 1, 100, sigmask)); 189 if (epfd > 0 && close(epfd)) 190 tst_resm(TWARN | TERRNO, "failed to close epfd");
|
/external/linux-kselftest/tools/testing/selftests/net/ |
reuseport_dualstack.c | 101 static int receive_once(int epfd, int proto) 107 i = epoll_wait(epfd, &ev, 1, -1); 130 int epfd, i, test_fd; local 134 epfd = epoll_create(1); 135 if (epfd < 0) 141 if (epoll_ctl(epfd, EPOLL_CTL_ADD, rcv_fds[i], &ev)) 147 test_fd = receive_once(epfd, proto); 154 close(epfd);
|
reuseport_bpf_cpu.c | 150 void receive_on_cpu(int *rcv_fd, int len, int epfd, int cpu_id, int proto) 156 i = epoll_wait(epfd, &ev, 1, -1); 186 int epfd, cpu; local 191 epfd = epoll_create(1); 192 if (epfd < 0) 197 if (epoll_ctl(epfd, EPOLL_CTL_ADD, rcv_fd[cpu], &ev)) 204 receive_on_cpu(rcv_fd, len, epfd, cpu, proto); 210 receive_on_cpu(rcv_fd, len, epfd, cpu, proto); 216 receive_on_cpu(rcv_fd, len, epfd, cpu, proto); 222 receive_on_cpu(rcv_fd, len, epfd, cpu, proto) [all...] |
reuseport_bpf_numa.c | 158 void receive_on_node(int *rcv_fd, int len, int epfd, int node_id, int proto) 164 i = epoll_wait(epfd, &ev, 1, -1); 194 int epfd, node; local 199 epfd = epoll_create(1); 200 if (epfd < 0) 205 if (epoll_ctl(epfd, EPOLL_CTL_ADD, rcv_fd[node], &ev)) 212 receive_on_node(rcv_fd, len, epfd, node, proto); 218 receive_on_node(rcv_fd, len, epfd, node, proto); 221 close(epfd);
|
reuseport_bpf.c | 215 int epfd, conn, i, sport, expected; local 218 epfd = epoll_create(1); 219 if (epfd < 0) 224 if (epoll_ctl(epfd, EPOLL_CTL_ADD, fd[i], &ev)) 238 i = epoll_wait(epfd, &ev, 1, -1);
|
/external/libevent/ |
epoll.c | 59 int epfd; member in struct:epollop 110 int epfd; local 115 if ((epfd = epoll_create(32000)) == -1) { 121 evutil_make_socket_closeonexec(epfd); 124 close(epfd); 128 epollop->epfd = epfd; 134 close(epfd); 265 if (epoll_ctl(epollop->epfd, op, ch->fd, &epev) == -1) { 271 if (epoll_ctl(epollop->epfd, EPOLL_CTL_ADD, ch->fd, &epev) == -1) [all...] |
/libcore/ojluni/src/main/java/sun/nio/ch/ |
EPollPort.java | 49 private final int epfd; field in class:EPollPort 89 this.epfd = epollCreate(); 96 epollCtl(epfd, EPOLL_CTL_ADD, sv[0], Net.POLLIN); 98 close0(epfd); 129 close0(epfd); 174 int err = epollCtl(epfd, EPOLL_CTL_MOD, fd, (events | EPOLLONESHOT)); 176 err = epollCtl(epfd, EPOLL_CTL_ADD, fd, (events | EPOLLONESHOT)); 194 int n = epollWait(epfd, address, MAX_EPOLL_EVENTS);
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/PyMod-2.7.2/Modules/ |
selectmodule.c | 707 SOCKET epfd; /* epoll control file descriptor */
member in struct:__anon5307 724 if (self->epfd >= 0) {
725 int epfd = self->epfd;
local 726 self->epfd = -1;
728 if (close(epfd) < 0)
757 self->epfd = epoll_create(sizehint);
761 self->epfd = fd;
763 if (self->epfd < 0) {
813 if (self->epfd < 0) [all...] |
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Modules/ |
selectmodule.c | 741 SOCKET epfd; /* epoll control file descriptor */
member in struct:__anon5608 758 if (self->epfd >= 0) {
759 int epfd = self->epfd;
local 760 self->epfd = -1;
762 if (close(epfd) < 0)
791 self->epfd = epoll_create(sizehint);
795 self->epfd = fd;
797 if (self->epfd < 0) {
847 if (self->epfd < 0) [all...] |
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Modules/ |
selectmodule.c | 707 SOCKET epfd; /* epoll control file descriptor */
member in struct:__anon5878 724 if (self->epfd >= 0) {
725 int epfd = self->epfd;
local 726 self->epfd = -1;
728 if (close(epfd) < 0)
757 self->epfd = epoll_create(sizehint);
761 self->epfd = fd;
763 if (self->epfd < 0) {
813 if (self->epfd < 0) [all...] |
/external/python/cpython2/Modules/ |
selectmodule.c | 730 SOCKET epfd; /* epoll control file descriptor */ member in struct:__anon30383 747 if (self->epfd >= 0) { 748 int epfd = self->epfd; local 749 self->epfd = -1; 751 if (close(epfd) < 0) 780 self->epfd = epoll_create(sizehint); 784 self->epfd = fd; 786 if (self->epfd < 0) { 836 if (self->epfd < 0 [all...] |