Home
last modified time | relevance | path

Searched refs:pollfds (Results 1 - 17 of 17) sorted by relevance

/third_party/alsa-utils/alsamixer/
H A Dmainloop.c74 struct pollfd *pollfds = NULL; in mainloop() local
91 free(pollfds); in mainloop()
93 pollfds = ccalloc(nfds, sizeof *pollfds); in mainloop()
94 pollfds[0].fd = fileno(stdin); in mainloop()
95 pollfds[0].events = POLLIN; in mainloop()
97 err = snd_mixer_poll_descriptors(mixer, &pollfds[1], nfds - 1); in mainloop()
100 n = poll(pollfds, nfds, -1); in mainloop()
103 pollfds[0].revents = 0; in mainloop()
109 if (pollfds[ in mainloop()
[all...]
/third_party/toybox/lib/
H A 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[ in pollinate()
[all...]
/third_party/musl/libc-test/src/functionalext/supplement/linux/
H A 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/libwebsockets/minimal-examples/http-server/minimal-http-server-eventlib-custom/
H A 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[ in custom_poll_run()
[all...]
/third_party/alsa-utils/seq/aseqnet/
H A 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, widt in do_loop()
[all...]
/third_party/pulseaudio/src/tests/
H A 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/libwebsockets/test-apps/
H A 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()
570 lwsl_err("Out of memory pollfds=%d\n", max_poll_elements); 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[ in main()
[all...]
/third_party/toybox/toys/pending/
H A Dtftpd.c109 struct pollfd pollfds[1]; in do_action() local
115 pollfds[0].fd = TT.sfd; in do_action()
181 pollfds[0].events = POLLIN; in do_action()
182 pollfds[0].fd = TT.sfd; in do_action()
183 poll_ret = poll(pollfds, 1, timeout); in do_action()
193 len = read(pollfds[0].fd, rpkt, blksize + 4); in do_action()
/third_party/ltp/testcases/kernel/pty/
H A 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/
H A Dmainloop.c108 struct pollfd *pollfds; member
592 pa_xfree(m->pollfds); in pa_mainloop_free()
626 m->pollfds = pa_xrealloc(m->pollfds, sizeof(struct pollfd)*l); in rebuild_pollfds()
631 p = m->pollfds; in rebuild_pollfds()
633 m->pollfds[0].fd = m->wakeup_pipe[0]; in rebuild_pollfds()
634 m->pollfds[0].events = POLLIN; in rebuild_pollfds()
635 m->pollfds[0].revents = 0; in rebuild_pollfds()
864 m->pollfds, m->n_pollfds, in pa_mainloop_poll()
872 m->pollfds, in pa_mainloop_poll()
[all...]
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/utils/
H A Deloop.c95 int max_poll_fds; /* number of pollfds currently allocated */
96 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()
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[nx in eloop_sock_table_set_fds()
517 eloop_sock_table_set_fds(struct eloop_sock_table *readers, struct eloop_sock_table *writers, struct eloop_sock_table *exceptions, struct pollfd *pollfds, struct pollfd **pollfds_map, int max_pollfd_map) eloop_sock_table_set_fds() argument
[all...]
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/utils/
H A Deloop.c95 size_t max_poll_fds; /* number of pollfds currently allocated */
96 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()
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[nx in eloop_sock_table_set_fds()
520 eloop_sock_table_set_fds(struct eloop_sock_table *readers, struct eloop_sock_table *writers, struct eloop_sock_table *exceptions, struct pollfd *pollfds, struct pollfd **pollfds_map, int max_pollfd_map) eloop_sock_table_set_fds() argument
[all...]
/third_party/nghttp2/examples/
H A Dclient.c542 struct pollfd pollfds[1]; in fetch_uri() local
598 pollfds[0].fd = fd; in fetch_uri()
599 ctl_poll(pollfds, &connection); in fetch_uri()
604 int nfds = poll(pollfds, npollfds, -1); in fetch_uri()
608 if (pollfds[0].revents & (POLLIN | POLLOUT)) { in fetch_uri()
611 if ((pollfds[0].revents & POLLHUP) || (pollfds[0].revents & POLLERR)) { in fetch_uri()
614 ctl_poll(pollfds, &connection); in fetch_uri()
/third_party/skia/third_party/externals/microhttpd/src/testspdy/
H A 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()
H A 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()
H A 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()
/third_party/alsa-lib/aserver/
H A Daserver.c113 struct pollfd *pollfds; variable
128 struct pollfd *pfd = &pollfds[pollfds_count]; in add_waiter()
146 if (pollfds[k].fd == fd) in del_waiter()
151 memmove(&pollfds[k], &pollfds[k + 1], pollfds_count - k); in del_waiter()
938 pollfds = calloc((size_t) open_max, sizeof(*pollfds)); in server()
978 err = poll(pollfds, pollfds_count, -1); in server()
986 memcpy(pfds, pollfds, sizeof(*pfds) * pfds_count); in server()
1004 free(pollfds); in server()
[all...]

Completed in 15 milliseconds