Home
last modified time | relevance | path

Searched refs:pollfds (Results 1 – 23 of 23) sorted by relevance

/external/google-breakpad/src/client/linux/crash_generation/
Dcrash_generation_server.cc158 struct pollfd pollfds[2]; in Run() local
159 memset(&pollfds, 0, sizeof(pollfds)); in Run()
161 pollfds[0].fd = server_fd_; in Run()
162 pollfds[0].events = POLLIN; in Run()
164 pollfds[1].fd = control_pipe_in_; in Run()
165 pollfds[1].events = POLLIN; in Run()
169 int nevents = poll(pollfds, sizeof(pollfds)/sizeof(pollfds[0]), -1); in Run()
178 if (pollfds[0].revents && !ClientEvent(pollfds[0].revents)) in Run()
181 if (pollfds[1].revents && !ControlEvent(pollfds[1].revents)) in Run()
/external/toybox/lib/
Dnet.c91 struct pollfd pollfds[2]; in pollinate() local
94 memset(pollfds, 0, 2*sizeof(struct pollfd)); in pollinate()
95 pollfds[0].events = pollfds[1].events = POLLIN; in pollinate()
96 pollfds[0].fd = in1; in pollinate()
97 pollfds[1].fd = in2; in pollinate()
101 if (!xpoll(pollfds, pollcount, timeout)) return pollcount; in pollinate()
104 if (pollfds[i].revents & POLLIN) { in pollinate()
105 int len = read(pollfds[i].fd, libbuf, sizeof(libbuf)); in pollinate()
106 if (len<1) pollfds[i].revents = POLLHUP; in pollinate()
109 if (pollfds[i].revents & POLLHUP) { in pollinate()
[all …]
/external/adhd/cras/src/server/
Dcras_server.c453 struct pollfd *pollfds; in cras_server_run() local
457 pollfds = malloc(sizeof(*pollfds) * pollfds_size); in cras_server_run()
551 pollfds = realloc(pollfds, in cras_server_run()
552 sizeof(*pollfds) * pollfds_size); in cras_server_run()
555 pollfds[0].fd = socket_fd; in cras_server_run()
556 pollfds[0].events = POLLIN; in cras_server_run()
560 pollfds[num_pollfds].fd = elm->fd; in cras_server_run()
561 pollfds[num_pollfds].events = POLLIN; in cras_server_run()
562 elm->pollfd = &pollfds[num_pollfds]; in cras_server_run()
568 pollfds[num_pollfds].fd = client_cb->select_fd; in cras_server_run()
[all …]
Dcras_alsa_card.c574 struct pollfd *pollfds; in cras_alsa_card_create() local
577 pollfds = malloc(n * sizeof(*pollfds)); in cras_alsa_card_create()
578 if (pollfds == NULL) { in cras_alsa_card_create()
583 n = snd_hctl_poll_descriptors(alsa_card->hctl, pollfds, n); in cras_alsa_card_create()
587 free(pollfds); in cras_alsa_card_create()
591 registered_fd->fd = pollfds[i].fd; in cras_alsa_card_create()
600 free(pollfds); in cras_alsa_card_create()
604 free(pollfds); in cras_alsa_card_create()
Daudio_thread.c848 thread->pollfds[thread->num_pollfds].fd = fd; in add_pollfd()
850 thread->pollfds[thread->num_pollfds].events = POLLOUT; in add_pollfd()
852 thread->pollfds[thread->num_pollfds].events = POLLIN; in add_pollfd()
856 thread->pollfds = in add_pollfd()
857 (struct pollfd *)realloc(thread->pollfds, in add_pollfd()
858 sizeof(*thread->pollfds) * in add_pollfd()
863 return &thread->pollfds[thread->num_pollfds - 1]; in add_pollfd()
908 thread->pollfds[0].fd = msg_fd; in audio_io_thread()
909 thread->pollfds[0].events = POLLIN; in audio_io_thread()
970 rc = ppoll(thread->pollfds, thread->num_pollfds, wait_ts, NULL); in audio_io_thread()
[all …]
Dcras_bt_device.c821 struct pollfd *pollfds; in cras_bt_device_sco_connect() local
848 pollfds = (struct pollfd *)malloc(sizeof(*pollfds)); in cras_bt_device_sco_connect()
849 pollfds[0].fd = sk; in cras_bt_device_sco_connect()
850 pollfds[0].events = POLLOUT; in cras_bt_device_sco_connect()
861 err = ppoll(pollfds, 1, &timeout, NULL); in cras_bt_device_sco_connect()
867 if (pollfds[0].revents & (POLLERR | POLLHUP)) { in cras_bt_device_sco_connect()
869 pollfds[0].revents); in cras_bt_device_sco_connect()
Daudio_thread.h42 struct pollfd *pollfds; member
/external/ipsec-tools/
Dmain.c131 static struct pollfd pollfds[10]; variable
152 pollfds[monitors].fd = fd; in monitor_fd()
153 pollfds[monitors].events = callback ? POLLIN : 0; in monitor_fd()
186 if (poll(pollfds, monitors, timeout) > 0) { in main()
189 if (pollfds[i].revents & POLLHUP) { in main()
190 do_plog(LLV_INFO, "Connection is closed\n", pollfds[i].fd); in main()
197 if (pollfds[i].revents & POLLIN) { in main()
198 callbacks[i](pollfds[i].fd); in main()
/external/mtpd/
Dmtpd.c164 struct pollfd pollfds[3]; in main() local
192 pollfds[0].fd = the_socket; in main()
193 pollfds[0].events = POLLIN; in main()
194 pollfds[1].fd = signals[0]; in main()
195 pollfds[1].events = POLLIN; in main()
196 pollfds[2].fd = control; in main()
197 pollfds[2].events = 0; in main()
200 if (poll(pollfds, 3, timeout ? timeout : -1) == -1 && errno != EINTR) { in main()
204 if (pollfds[1].revents) { in main()
207 if (pollfds[2].revents) { in main()
[all …]
/external/toybox/toys/pending/
Dtftpd.c94 struct pollfd pollfds[1]; in do_action() local
100 pollfds[0].fd = TT.sfd; in do_action()
166 pollfds[0].events = POLLIN; in do_action()
167 pollfds[0].fd = TT.sfd; in do_action()
168 poll_ret = poll(pollfds, 1, timeout); in do_action()
178 len = read(pollfds[0].fd, rpkt, blksize + 4); in do_action()
/external/ltp/testcases/kernel/pty/
Dhangup01.c92 struct pollfd pollfds[1]; in parent() local
99 pollfds[0].fd = masterfd; in parent()
100 pollfds[0].events = POLLIN; in parent()
104 while ((i = poll(pollfds, 1, -1)) == 1) { in parent()
/external/v4l2_codec2/vda/
Dv4l2_device.cc143 struct pollfd pollfds[2]; in Poll() local
147 pollfds[0].fd = device_poll_interrupt_fd_.get(); in Poll()
148 pollfds[0].events = POLLIN | POLLERR; in Poll()
153 pollfds[nfds].fd = device_fd_.get(); in Poll()
154 pollfds[nfds].events = POLLIN | POLLOUT | POLLERR | POLLPRI; in Poll()
159 if (HANDLE_EINTR(poll(pollfds, nfds, -1)) == -1) { in Poll()
163 *event_pending = (pollfd != -1 && pollfds[pollfd].revents & POLLPRI); in Poll()
/external/libusb/libusb/
Dio.c1200 if (ctx->pollfds) in usbi_io_exit()
1201 free(ctx->pollfds); in usbi_io_exit()
2108 if (ctx->pollfds) { in handle_events()
2109 free(ctx->pollfds); in handle_events()
2110 ctx->pollfds = NULL; in handle_events()
2117 ctx->pollfds = calloc(ctx->pollfds_cnt, sizeof(*ctx->pollfds)); in handle_events()
2118 if (!ctx->pollfds) { in handle_events()
2127 ctx->pollfds[i].fd = pollfd->fd; in handle_events()
2128 ctx->pollfds[i].events = pollfd->events; in handle_events()
2139 fds = ctx->pollfds; in handle_events()
[all …]
Dlibusbi.h318 struct pollfd *pollfds; member
Dlibusb.h1869 void LIBUSB_CALL libusb_free_pollfds(const struct libusb_pollfd **pollfds);
/external/wpa_supplicant_8/src/utils/
Deloop.c84 struct pollfd *pollfds; member
297 n = os_realloc_array(eloop.pollfds, nmax, in eloop_sock_table_add_sock()
303 eloop.pollfds = n; in eloop_sock_table_add_sock()
443 struct pollfd *pollfds, in eloop_sock_table_set_fds() argument
459 pollfds[nxt].fd = fd; in eloop_sock_table_set_fds()
460 pollfds[nxt].events = POLLIN; in eloop_sock_table_set_fds()
461 pollfds[nxt].revents = 0; in eloop_sock_table_set_fds()
462 pollfds_map[fd] = &(pollfds[nxt]); in eloop_sock_table_set_fds()
477 pfd = &(pollfds[nxt]); in eloop_sock_table_set_fds()
480 pollfds[i].revents = 0; in eloop_sock_table_set_fds()
[all …]
/external/adhd/cras/src/libcras/
Dcras_client.c994 struct pollfd pollfds[2]; in read_with_wake_fd() local
1000 pollfds[0].fd = wake_fd; in read_with_wake_fd()
1001 pollfds[0].events = POLLIN; in read_with_wake_fd()
1004 pollfds[1].fd = read_fd; in read_with_wake_fd()
1005 pollfds[1].events = POLLIN; in read_with_wake_fd()
1008 rc = poll(pollfds, nfds, -1); in read_with_wake_fd()
1011 if (read_fd >= 0 && pollfds[1].revents & POLLIN) { in read_with_wake_fd()
1016 if (pollfds[0].revents & POLLIN) { in read_with_wake_fd()
1976 struct pollfd pollfds[4]; in client_thread() local
1990 pollfds[num_pollfds].fd = rc; in client_thread()
[all …]
/external/ppp/pppd/
Dsys-solaris.c228 static struct pollfd pollfds[MAX_POLLFDS]; variable
1374 if (poll(pollfds, n_pollfds, t) < 0 && errno != EINTR)
1387 if (pollfds[n].fd == fd)
1390 pollfds[n_pollfds].fd = fd;
1391 pollfds[n_pollfds].events = POLLIN | POLLPRI | POLLHUP;
1406 if (pollfds[n].fd == fd) {
1408 pollfds[n-1] = pollfds[n];
/external/grpc-grpc/src/core/lib/iomgr/
Dev_poll_posix.cc1666 struct pollfd* pollfds = static_cast<struct pollfd*>( local
1671 pollfds[idx].fd = fds[i].fd;
1672 pollfds[idx].events = fds[i].events;
1673 pollfds[idx].revents = 0;
1677 poll_args* pargs = get_poller_locked(pollfds, nsockfds);
/external/libcups/cups/
Dhttp-support.c130 static int http_poll_cb(struct pollfd *pollfds, unsigned int num_pollfds,
2466 struct pollfd *pollfds, /* I - File descriptors */ in http_poll_cb() argument
2474 return (poll(pollfds, num_pollfds, 2000)); in http_poll_cb()
Ddest.c212 static int cups_dnssd_poll_cb(struct pollfd *pollfds,
3032 struct pollfd *pollfds, /* I - File descriptors */ in cups_dnssd_poll_cb() argument
3042 …DEBUG_printf(("cups_dnssd_poll_cb(pollfds=%p, num_pollfds=%d, timeout=%d, context=%p)", pollfds, n… in cups_dnssd_poll_cb()
3046 val = poll(pollfds, num_pollfds, _CUPS_DNSSD_MAXTIME); in cups_dnssd_poll_cb()
/external/libusb/include/libusb/
Dlibusbi.h318 struct pollfd *pollfds; member
Dlibusb.h1869 void LIBUSB_CALL libusb_free_pollfds(const struct libusb_pollfd **pollfds);