Home
last modified time | relevance | path

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

/third_party/alsa-utils/alsamixer/
Dmainloop.c71 struct pollfd *pollfds = NULL; in mainloop() local
88 free(pollfds); in mainloop()
90 pollfds = ccalloc(nfds, sizeof *pollfds); in mainloop()
91 pollfds[0].fd = fileno(stdin); in mainloop()
92 pollfds[0].events = POLLIN; in mainloop()
94 err = snd_mixer_poll_descriptors(mixer, &pollfds[1], nfds - 1); in mainloop()
97 n = poll(pollfds, nfds, -1); in mainloop()
100 pollfds[0].revents = 0; in mainloop()
106 if (pollfds[0].revents & (POLLERR | POLLHUP | POLLNVAL)) in mainloop()
108 if (pollfds[0].revents & POLLIN) in mainloop()
[all …]
/third_party/toybox/lib/
Dnet.c101 struct pollfd pollfds[2]; in pollinate() local
104 memset(pollfds, 0, 2*sizeof(struct pollfd)); in pollinate()
105 pollfds[0].events = pollfds[1].events = POLLIN; in pollinate()
106 pollfds[0].fd = in1; in pollinate()
107 pollfds[1].fd = in2; in pollinate()
111 if (!xpoll(pollfds, pollcount, timeout)) return pollcount; in pollinate()
114 if (pollfds[i].revents & POLLIN) { in pollinate()
115 int len = read(pollfds[i].fd, libbuf, sizeof(libbuf)); in pollinate()
116 if (len<1) pollfds[i].revents = POLLHUP; in pollinate()
119 if (pollfds[i].revents & POLLHUP) { in pollinate()
[all …]
/third_party/libwebsockets/minimal-examples/http-server/minimal-http-server-eventlib-custom/
Dminimal-http-server.c29 struct lws_pollfd pollfds[MAX_CUSTOM_POLLFDS]; member
50 if (cpcx->pollfds[n].fd == fd) in custom_poll_find_fd()
51 return &cpcx->pollfds[n]; in custom_poll_find_fd()
69 if (cpcx->count_pollfds == LWS_ARRAY_SIZE(cpcx->pollfds)) { in custom_poll_add_fd()
74 pfd = &cpcx->pollfds[cpcx->count_pollfds++]; in custom_poll_add_fd()
96 *pfd = cpcx->pollfds[cpcx->count_pollfds - 1]; in custom_poll_del_fd()
139 n = poll(cpcx->pollfds, (nfds_t)cpcx->count_pollfds, n); in custom_poll_run()
147 lws_sockfd_type fd = cpcx->pollfds[n].fd; in custom_poll_run()
150 if (!cpcx->pollfds[n].revents) in custom_poll_run()
153 m = lws_service_fd(context, &cpcx->pollfds[n]); in custom_poll_run()
[all …]
/third_party/musl/libc-test/src/functionalext/supplement/linux/
Dppoll.c34 struct pollfd pollfds[] = {{.fd = fd, .events = POLLIN, .revents = 0}}; in ppoll_0100() local
39 int ret = ppoll(pollfds, 1, &timeout, NULL); in ppoll_0100()
41 EXPECT_EQ("ppoll_0100", pollfds[0].revents, POLLIN); in ppoll_0100()
57 struct pollfd pollfds[] = {{.fd = -1, .events = POLLIN, .revents = 0}}; in ppoll_0200() local
62 int ret = ppoll(pollfds, 1, &timeout, NULL); in ppoll_0200()
/third_party/alsa-utils/seq/aseqnet/
Daseqnet.c68 static struct pollfd *pollfds = NULL; variable
211 pollfds = (struct pollfd *)calloc(pollfds_count, sizeof(struct pollfd)); in init_pollfds()
212 assert(pollfds); in init_pollfds()
489 memset(pollfds, 0, pollfds_count * sizeof(struct pollfd)); in do_loop()
491 memcpy(pollfds, seqifds, sizeof(*seqifds)*(width = seqifds_count)); in do_loop()
494 pollfds[width].fd = sockfd; in do_loop()
495 pollfds[width].events = POLLIN; in do_loop()
501 pollfds[width].fd = netfd[i]; in do_loop()
502 pollfds[width].events = POLLIN; in do_loop()
507 rc = poll(pollfds, width, -1); in do_loop()
[all …]
/third_party/libwebsockets/test-apps/
Dtest-server.c39 struct lws_pollfd *pollfds; variable
76 if (pollfds[n].fd == fd) in ext_find_fd()
77 return &pollfds[n]; in ext_find_fd()
113 count_pollfds = (int)((pfd - pollfds) + 1); in lws_callback_http()
567 pollfds = malloc((unsigned int)max_poll_elements * sizeof (struct lws_pollfd)); in main()
569 if (pollfds == NULL || fd_lookup == NULL) { in main()
574 pollfds[n].fd = LWS_SOCK_INVALID; in main()
696 n = poll(pollfds, (nfds_t)count_pollfds, n); in main()
702 if (pollfds[n].revents) in main()
709 &pollfds[n]) < 0) in main()
/third_party/pulseaudio/src/tests/
Dalsa-time-test.c37 struct pollfd *pollfds; in main() local
143 pollfds = malloc(sizeof(struct pollfd) * n_pollfd); in main()
144 assert(pollfds); in main()
146 r = snd_pcm_poll_descriptors(pcm, pollfds, n_pollfd); in main()
165 r = poll(pollfds, n_pollfd, 0); in main()
168 r = snd_pcm_poll_descriptors_revents(pcm, pollfds, n_pollfd, &revents); in main()
/third_party/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()
/third_party/ltp/testcases/kernel/pty/
Dhangup01.c89 struct pollfd pollfds[1]; in parent() local
96 pollfds[0].fd = masterfd; in parent()
97 pollfds[0].events = POLLIN; in parent()
101 while ((i = poll(pollfds, 1, -1)) == 1) { in parent()
/third_party/pulseaudio/src/pulse/
Dmainloop.c104 struct pollfd *pollfds; member
577 pa_xfree(m->pollfds); in pa_mainloop_free()
605 m->pollfds = pa_xrealloc(m->pollfds, sizeof(struct pollfd)*l); in rebuild_pollfds()
610 p = m->pollfds; in rebuild_pollfds()
612 m->pollfds[0].fd = m->wakeup_pipe[0]; in rebuild_pollfds()
613 m->pollfds[0].events = POLLIN; in rebuild_pollfds()
614 m->pollfds[0].revents = 0; in rebuild_pollfds()
843 m->pollfds, m->n_pollfds, in pa_mainloop_poll()
851 m->pollfds, m->n_pollfds, in pa_mainloop_poll()
856 m->pollfds, m->n_pollfds, in pa_mainloop_poll()
/third_party/nghttp2/examples/
Dclient.c538 struct pollfd pollfds[1]; in fetch_uri() local
594 pollfds[0].fd = fd; in fetch_uri()
595 ctl_poll(pollfds, &connection); in fetch_uri()
600 int nfds = poll(pollfds, npollfds, -1); in fetch_uri()
604 if (pollfds[0].revents & (POLLIN | POLLOUT)) { in fetch_uri()
607 if ((pollfds[0].revents & POLLHUP) || (pollfds[0].revents & POLLERR)) { in fetch_uri()
610 ctl_poll(pollfds, &connection); in fetch_uri()
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/utils/
Deloop.c96 struct pollfd *pollfds; member
377 n = os_realloc_array(eloop.pollfds, nmax, in eloop_sock_table_add_sock()
383 eloop.pollfds = n; in eloop_sock_table_add_sock()
523 struct pollfd *pollfds, in eloop_sock_table_set_fds() argument
539 pollfds[nxt].fd = fd; in eloop_sock_table_set_fds()
540 pollfds[nxt].events = POLLIN; in eloop_sock_table_set_fds()
541 pollfds[nxt].revents = 0; in eloop_sock_table_set_fds()
542 pollfds_map[fd] = &(pollfds[nxt]); in eloop_sock_table_set_fds()
557 pfd = &(pollfds[nxt]); in eloop_sock_table_set_fds()
560 pollfds[i].revents = 0; in eloop_sock_table_set_fds()
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/utils/
Deloop.c96 struct pollfd *pollfds; member
374 n = os_realloc_array(eloop.pollfds, nmax, in eloop_sock_table_add_sock()
380 eloop.pollfds = n; in eloop_sock_table_add_sock()
520 struct pollfd *pollfds, in eloop_sock_table_set_fds() argument
536 pollfds[nxt].fd = fd; in eloop_sock_table_set_fds()
537 pollfds[nxt].events = POLLIN; in eloop_sock_table_set_fds()
538 pollfds[nxt].revents = 0; in eloop_sock_table_set_fds()
539 pollfds_map[fd] = &(pollfds[nxt]); in eloop_sock_table_set_fds()
554 pfd = &(pollfds[nxt]); in eloop_sock_table_set_fds()
557 pollfds[i].revents = 0; in eloop_sock_table_set_fds()
[all …]
/third_party/gstreamer/gstplugins_good/ext/raw1394/
Dgsthdv1394src.c373 struct pollfd pollfds[2]; in gst_hdv1394src_create() local
375 pollfds[0].fd = raw1394_get_fd (dv1394src->handle); in gst_hdv1394src_create()
376 pollfds[0].events = POLLIN | POLLERR | POLLHUP | POLLPRI; in gst_hdv1394src_create()
377 pollfds[1].fd = READ_SOCKET (dv1394src); in gst_hdv1394src_create()
378 pollfds[1].events = POLLIN | POLLERR | POLLHUP | POLLPRI; in gst_hdv1394src_create()
387 int res = poll (pollfds, 2, -1); in gst_hdv1394src_create()
398 if (G_UNLIKELY (pollfds[1].revents)) { in gst_hdv1394src_create()
401 if (pollfds[1].revents & POLLIN) in gst_hdv1394src_create()
405 } else if (G_LIKELY (pollfds[0].revents & POLLIN)) { in gst_hdv1394src_create()
Dgstdv1394src.c647 struct pollfd pollfds[2]; in gst_dv1394src_create() local
649 pollfds[0].fd = raw1394_get_fd (dv1394src->handle); in gst_dv1394src_create()
650 pollfds[0].events = POLLIN | POLLERR | POLLHUP | POLLPRI; in gst_dv1394src_create()
651 pollfds[1].fd = READ_SOCKET (dv1394src); in gst_dv1394src_create()
652 pollfds[1].events = POLLIN | POLLERR | POLLHUP | POLLPRI; in gst_dv1394src_create()
661 int res = poll (pollfds, 2, -1); in gst_dv1394src_create()
670 if (G_UNLIKELY (pollfds[1].revents)) { in gst_dv1394src_create()
673 if (pollfds[1].revents & POLLIN) in gst_dv1394src_create()
677 } else if (G_LIKELY (pollfds[0].revents & POLLIN)) { in gst_dv1394src_create()
/third_party/skia/third_party/externals/microhttpd/src/testspdy/
Dtest_request_response.c651 struct pollfd pollfds[1]; in fetch_uri() local
692 pollfds[0].fd = fd; in fetch_uri()
693 ctl_poll(pollfds, &connection); in fetch_uri()
698 int nfds = poll(pollfds, npollfds, -1); in fetch_uri()
702 if(pollfds[0].revents & (POLLIN | POLLOUT)) { in fetch_uri()
705 if((pollfds[0].revents & POLLHUP) || (pollfds[0].revents & POLLERR)) { in fetch_uri()
708 ctl_poll(pollfds, &connection); in fetch_uri()
Dtest_new_connection.c663 struct pollfd pollfds[1]; in fetch_uri() local
704 pollfds[0].fd = fd; in fetch_uri()
705 ctl_poll(pollfds, &connection); in fetch_uri()
710 int nfds = poll(pollfds, npollfds, -1); in fetch_uri()
714 if(pollfds[0].revents & (POLLIN | POLLOUT)) { in fetch_uri()
717 if((pollfds[0].revents & POLLHUP) || (pollfds[0].revents & POLLERR)) { in fetch_uri()
720 ctl_poll(pollfds, &connection); in fetch_uri()
Dtest_notls.c613 struct pollfd pollfds[1]; in fetch_uri() local
642 pollfds[0].fd = fd; in fetch_uri()
643 ctl_poll(pollfds, &connection); in fetch_uri()
648 int nfds = poll(pollfds, npollfds, -1); in fetch_uri()
652 if(pollfds[0].revents & (POLLIN | POLLOUT)) { in fetch_uri()
655 if((pollfds[0].revents & POLLHUP) || (pollfds[0].revents & POLLERR)) { in fetch_uri()
658 ctl_poll(pollfds, &connection); in fetch_uri()
/third_party/alsa-lib/aserver/
Daserver.c112 struct pollfd *pollfds; variable
127 struct pollfd *pfd = &pollfds[pollfds_count]; in add_waiter()
145 if (pollfds[k].fd == fd) in del_waiter()
150 memmove(&pollfds[k], &pollfds[k + 1], pollfds_count - k); in del_waiter()
933 pollfds = calloc((size_t) open_max, sizeof(*pollfds)); in server()
973 err = poll(pollfds, pollfds_count, -1); in server()
981 memcpy(pfds, pollfds, sizeof(*pfds) * pfds_count); in server()
999 free(pollfds); in server()
/third_party/libusb/libusb/
Dio.c2771 void API_EXPORTED libusb_free_pollfds(const struct libusb_pollfd **pollfds) in libusb_free_pollfds() argument
2774 free((void *)pollfds); in libusb_free_pollfds()
2776 UNUSED(pollfds); in libusb_free_pollfds()
Dlibusb.h1916 void LIBUSB_CALL libusb_free_pollfds(const struct libusb_pollfd **pollfds);
/third_party/libwebsockets/READMEs/
DREADME.coding.md371 You can pass all pollfds that need service to `lws_service_fd()`, even
/third_party/NuttX/
DReleaseNotes25566 - z80sim Serial: Fix uart_dev_t initializer: pollfds[] is a array of