/external/toybox/lib/ |
net.c | 91 struct pollfd pollfds[2]; local 94 memset(pollfds, 0, 2*sizeof(struct pollfd)); 95 pollfds[0].events = pollfds[1].events = POLLIN; 96 pollfds[0].fd = in1; 97 pollfds[1].fd = in2; 101 if (!xpoll(pollfds, pollcount, timeout)) return pollcount; 104 if (pollfds[i].revents & POLLIN) { 105 int len = read(pollfds[i].fd, libbuf, sizeof(libbuf)); 106 if (len<1) pollfds[i].revents = POLLHUP [all...] |
/cts/tests/tests/graphics/jni/ |
android_graphics_cts_SyncTest.cpp | 43 std::unique_ptr<pollfd[]> pollfds = std::make_unique<pollfd[]>(n); 47 pollfds[i].fd = fds[i]; 48 pollfds[i].events = POLLIN; 54 ret = poll(pollfds.get(), n, -1 /* infinite timeout */); 61 if (pollfds[i].fd < 0) 63 if ((pollfds[i].revents & (POLLERR | POLLNVAL)) != 0) 65 else if ((pollfds[i].revents & POLLIN) != 0)
|
/external/google-breakpad/src/client/linux/crash_generation/ |
crash_generation_server.cc | 158 struct pollfd pollfds[2]; local 159 memset(&pollfds, 0, sizeof(pollfds)); 161 pollfds[0].fd = server_fd_; 162 pollfds[0].events = POLLIN; 164 pollfds[1].fd = control_pipe_in_; 165 pollfds[1].events = POLLIN; 169 int nevents = poll(pollfds, sizeof(pollfds)/sizeof(pollfds[0]), -1) [all...] |
/external/adhd/cras/src/server/ |
cras_server.c | 453 struct pollfd *pollfds; local 457 pollfds = malloc(sizeof(*pollfds) * pollfds_size); 551 pollfds = realloc(pollfds, 552 sizeof(*pollfds) * pollfds_size); 555 pollfds[0].fd = socket_fd; 556 pollfds[0].events = POLLIN; 560 pollfds[num_pollfds].fd = elm->fd; 561 pollfds[num_pollfds].events = POLLIN [all...] |
cras_alsa_card.c | 574 struct pollfd *pollfds; local 577 pollfds = malloc(n * sizeof(*pollfds)); 578 if (pollfds == NULL) { 583 n = snd_hctl_poll_descriptors(alsa_card->hctl, pollfds, n); 587 free(pollfds); 591 registered_fd->fd = pollfds[i].fd; 600 free(pollfds); 604 free(pollfds);
|
audio_thread.h | 30 * pollfds - What FDs wake up this thread. 42 struct pollfd *pollfds; member in struct:audio_thread
|
audio_thread.c | 848 thread->pollfds[thread->num_pollfds].fd = fd; 850 thread->pollfds[thread->num_pollfds].events = POLLOUT; 852 thread->pollfds[thread->num_pollfds].events = POLLIN; 856 thread->pollfds = 857 (struct pollfd *)realloc(thread->pollfds, 858 sizeof(*thread->pollfds) * 863 return &thread->pollfds[thread->num_pollfds - 1]; 908 thread->pollfds[0].fd = msg_fd; 909 thread->pollfds[0].events = POLLIN; 970 rc = ppoll(thread->pollfds, thread->num_pollfds, wait_ts, NULL) [all...] |
cras_bt_device.c | 821 struct pollfd *pollfds; local 848 pollfds = (struct pollfd *)malloc(sizeof(*pollfds)); 849 pollfds[0].fd = sk; 850 pollfds[0].events = POLLOUT; 861 err = ppoll(pollfds, 1, &timeout, NULL); 867 if (pollfds[0].revents & (POLLERR | POLLHUP)) { 869 pollfds[0].revents); [all...] |
/external/ipsec-tools/ |
main.c | 131 static struct pollfd pollfds[10]; variable in typeref:struct:pollfd 152 pollfds[monitors].fd = fd; 153 pollfds[monitors].events = callback ? POLLIN : 0; 186 if (poll(pollfds, monitors, timeout) > 0) { 189 if (pollfds[i].revents & POLLHUP) { 190 do_plog(LLV_INFO, "Connection is closed\n", pollfds[i].fd); 197 if (pollfds[i].revents & POLLIN) { 198 callbacks[i](pollfds[i].fd);
|
/external/ltp/testcases/kernel/pty/ |
hangup01.c | 92 struct pollfd pollfds[1]; local 99 pollfds[0].fd = masterfd; 100 pollfds[0].events = POLLIN; 104 while ((i = poll(pollfds, 1, -1)) == 1) {
|
/external/mtpd/ |
mtpd.c | 164 struct pollfd pollfds[3]; local 192 pollfds[0].fd = the_socket; 193 pollfds[0].events = POLLIN; 194 pollfds[1].fd = signals[0]; 195 pollfds[1].events = POLLIN; 196 pollfds[2].fd = control; 197 pollfds[2].events = 0; 200 if (poll(pollfds, 3, timeout ? timeout : -1) == -1 && errno != EINTR) { 204 if (pollfds[1].revents) { 207 if (pollfds[2].revents) [all...] |
/external/toybox/toys/pending/ |
tftpd.c | 94 struct pollfd pollfds[1]; local 100 pollfds[0].fd = TT.sfd; 166 pollfds[0].events = POLLIN; 167 pollfds[0].fd = TT.sfd; 168 poll_ret = poll(pollfds, 1, timeout); 178 len = read(pollfds[0].fd, rpkt, blksize + 4);
|
/bionic/libc/bionic/ |
system_property_set.cpp | 201 pollfd pollfds[1]; 202 pollfds[0].fd = s; 203 pollfds[0].events = 0; 204 const int poll_result = TEMP_FAILURE_RETRY(poll(pollfds, 1, 250 /* ms */)); 205 if (poll_result == 1 && (pollfds[0].revents & POLLHUP) != 0) {
|
/external/v4l2_codec2/vda/ |
v4l2_device.cc | 143 struct pollfd pollfds[2]; local 147 pollfds[0].fd = device_poll_interrupt_fd_.get(); 148 pollfds[0].events = POLLIN | POLLERR; 153 pollfds[nfds].fd = device_fd_.get(); 154 pollfds[nfds].events = POLLIN | POLLOUT | POLLERR | POLLPRI; 159 if (HANDLE_EINTR(poll(pollfds, nfds, -1)) == -1) { 163 *event_pending = (pollfd != -1 && pollfds[pollfd].revents & POLLPRI);
|
/external/libusb/libusb/ |
io.c | [all...] |
/build/make/tools/makeparallel/ |
makeparallel.cpp | 245 pollfd pollfds[] = {{in_fd, POLLIN, 0}}; local 247 while ((ret = TEMP_FAILURE_RETRY(poll(pollfds, 1, 0))) != 0) { 250 } else if (pollfds[0].revents != POLLIN) { 251 error(EXIT_FAILURE, 0, "unexpected event %d\n", pollfds[0].revents);
|
/external/wpa_supplicant_8/src/utils/ |
eloop.c | 83 int max_poll_fds; /* number of pollfds currently allocated */ 84 struct pollfd *pollfds; member in struct:eloop_data 297 n = os_realloc_array(eloop.pollfds, nmax, 303 eloop.pollfds = n; 443 struct pollfd *pollfds, 459 pollfds[nxt].fd = fd; 460 pollfds[nxt].events = POLLIN; 461 pollfds[nxt].revents = 0; 462 pollfds_map[fd] = &(pollfds[nxt]); 477 pfd = &(pollfds[nxt]) [all...] |
/device/google/contexthub/util/nanotool/ |
androidcontexthub.cpp | 241 struct pollfd pollfds[kDeviceFileCount]; local 242 int fd_count = ResetPollFds(pollfds, kDeviceFileCount); 245 int ret = poll(pollfds, fd_count, timeout); 257 if (pollfds[i].revents & POLLIN) { 258 read_fd = pollfds[i].fd;
|
/external/adhd/cras/src/libcras/ |
cras_client.c | 994 struct pollfd pollfds[2]; local 1000 pollfds[0].fd = wake_fd; 1001 pollfds[0].events = POLLIN; 1004 pollfds[1].fd = read_fd; 1005 pollfds[1].events = POLLIN; 1008 rc = poll(pollfds, nfds, -1); 1011 if (read_fd >= 0 && pollfds[1].revents & POLLIN) { 1016 if (pollfds[0].revents & POLLIN) { 1976 struct pollfd pollfds[4]; local [all...] |
/art/adbconnection/ |
adbconnection.cc | 567 struct pollfd pollfds[4] = { local 579 int res = TEMP_FAILURE_RETRY(poll(pollfds, 4, -1)); 585 // const struct pollfd& sleep_event_poll = pollfds[0]; 586 const struct pollfd& agent_control_sock_poll = pollfds[1]; 587 const struct pollfd& control_sock_poll = pollfds[2]; 588 const struct pollfd& adb_socket_poll = pollfds[3]; [all...] |
/external/ppp/pppd/ |
sys-solaris.c | 228 static struct pollfd pollfds[MAX_POLLFDS]; variable in typeref:struct:pollfd [all...] |
/art/dt_fd_forward/ |
dt_fd_forward.cc | 202 struct pollfd pollfds[2]; local 221 pollfds[0] = { read_fd_, POLLRDHUP | POLLIN, 0 }; 222 pollfds[1] = { wakeup_fd_, POLLIN, 0 }; 228 int poll_res = TEMP_FAILURE_RETRY(poll(pollfds, 2, -1));
|
/bionic/libc/upstream-netbsd/lib/libc/isc/ |
eventlib_p.h | 234 struct pollfd *pollfds; /* Allocated as needed */ member in struct:__anon1517
|
/external/grpc-grpc/src/core/lib/iomgr/ |
ev_poll_posix.cc | 1666 struct pollfd* pollfds = static_cast<struct pollfd*>( local [all...] |
/external/libcups/cups/ |
http-support.c | 130 static int http_poll_cb(struct pollfd *pollfds, unsigned int num_pollfds, [all...] |