Home
last modified time | relevance | path

Searched refs:pfds (Results 1 – 25 of 51) sorted by relevance

123

/third_party/ltp/testcases/kernel/syscalls/lseek/
Dlseek02.c28 static int pfds[2]; variable
44 {&pfds[0], SEEK_SET, ESPIPE},
45 {&pfds[0], SEEK_CUR, ESPIPE},
46 {&pfds[0], SEEK_END, ESPIPE},
78 SAFE_PIPE(pfds); in setup()
91 if (pfds[0] > 0) in cleanup()
92 SAFE_CLOSE(pfds[0]); in cleanup()
94 if (pfds[1] > 0) in cleanup()
95 SAFE_CLOSE(pfds[1]); in cleanup()
/third_party/alsa-lib/test/
Dseq-sender.c149 struct pollfd *pfds; in event_sender() local
232 pfds = alloca(sizeof(*pfds) * max); in event_sender()
236 snd_seq_poll_descriptors(handle, pfds, nseqs, POLLOUT|POLLIN); in event_sender()
238 snd_seq_poll_descriptors(handle, pfds, nseqs, POLLIN); in event_sender()
243 snd_seq_poll_descriptors(phandle, pfds + max, pmax); in event_sender()
247 if (poll(pfds, max, -1) < 0) in event_sender()
250 if (phandle && (pfds[nseqs].revents & POLLOUT)) { in event_sender()
257 if (pfds[0].revents & POLLOUT) in event_sender()
259 if (pfds[0].revents & POLLIN) { in event_sender()
Dplaymidi1.c120 struct pollfd *pfds = alloca(sizeof(*pfds) * npfds); in write_ev() local
121 snd_seq_poll_descriptors(seq_handle, pfds, npfds, POLLOUT); in write_ev()
122 if ((rc = poll(pfds, npfds, -1)) < 0) { in write_ev()
378 struct pollfd *pfds = alloca(sizeof(*pfds) * npfds); in wait_for_event() local
379 snd_seq_poll_descriptors(seq_handle, pfds, npfds, POLLIN); in wait_for_event()
380 if ((left = poll(pfds, npfds, -1)) < 0) { in wait_for_event()
Dseq-decoder.c268 struct pollfd *pfds; in event_decoder() local
345 pfds = alloca(sizeof(*pfds) * max); in event_decoder()
347 snd_seq_poll_descriptors(handle, pfds, max, POLLIN); in event_decoder()
348 if (poll(pfds, max, -1) < 0) in event_decoder()
/third_party/alsa-utils/axfer/
Dwaiter.c72 waiter->pfds = calloc(pfd_count, sizeof(*waiter->pfds)); in waiter_context_init()
73 if (waiter->pfds == NULL) in waiter_context_init()
98 if (waiter->pfds) in waiter_context_destroy()
99 free(waiter->pfds); in waiter_context_destroy()
Dwaiter-epoll.c41 .data.fd = waiter->pfds[i].fd, in epoll_prepare()
42 .events = waiter->pfds[i].events, in epoll_prepare()
70 if (waiter->pfds[i].fd == ev->data.fd) { in epoll_wait_event()
71 waiter->pfds[i].revents = ev->events; in epoll_wait_event()
87 int fd = waiter->pfds[i].fd; in epoll_release()
Dwaiter-select.c57 pfd = &waiter->pfds[i]; in select_wait_event()
83 pfd = &waiter->pfds[i]; in select_wait_event()
/third_party/alsa-utils/amidi/
Damidi.c648 struct pollfd *pfds; in main() local
651 pfds = alloca(npfds * sizeof(struct pollfd)); in main()
654 pfds[0].fd = timerfd_create(CLOCK_MONOTONIC, 0); in main()
655 if (pfds[0].fd == -1) { in main()
659 pfds[0].events = POLLIN; in main()
661 pfds[0].fd = -1; in main()
664 snd_rawmidi_poll_descriptors(input, &pfds[1], npfds - 1); in main()
673 err = timerfd_settime(pfds[0].fd, 0, &itimerspec, NULL); in main()
686 err = poll(pfds, npfds, -1); in main()
699 err = snd_rawmidi_poll_descriptors_revents(input, &pfds[1], npfds - 1, &revents); in main()
[all …]
/third_party/toybox/toys/pending/
Dtelnet.c291 struct pollfd pfds[2]; in telnet_main() local
314 pfds[0].fd = STDIN_FILENO; in telnet_main()
315 pfds[0].events = POLLIN; in telnet_main()
316 pfds[1].fd = TT.sfd; in telnet_main()
317 pfds[1].events = POLLIN; in telnet_main()
322 if(poll(pfds, 2, -1) < 0) { in telnet_main()
328 if(pfds[0].revents) { in telnet_main()
333 if(pfds[1].revents) { in telnet_main()
/third_party/alsa-lib/src/mixer/
Dmixer.c710 int snd_mixer_poll_descriptors(snd_mixer_t *mixer, struct pollfd *pfds, unsigned int space) in snd_mixer_poll_descriptors() argument
719 n = snd_hctl_poll_descriptors(s->hctl, pfds, space); in snd_mixer_poll_descriptors()
725 pfds += n; in snd_mixer_poll_descriptors()
740 int snd_mixer_poll_descriptors_revents(snd_mixer_t *mixer, struct pollfd *pfds, unsigned int nfds, … in snd_mixer_poll_descriptors_revents() argument
744 assert(mixer && pfds && revents); in snd_mixer_poll_descriptors_revents()
748 for (idx = 0; idx < nfds; idx++, pfds++) in snd_mixer_poll_descriptors_revents()
749 res |= pfds->revents & (POLLIN|POLLERR|POLLNVAL); in snd_mixer_poll_descriptors_revents()
763 struct pollfd *pfds = spfds; in snd_mixer_wait() local
766 count = snd_mixer_poll_descriptors(mixer, pfds, sizeof(spfds) / sizeof(spfds[0])); in snd_mixer_wait()
770 pfds = alloca(count * sizeof(*pfds)); in snd_mixer_wait()
[all …]
/third_party/alsa-lib/src/hwdep/
Dhwdep.c266 int snd_hwdep_poll_descriptors(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int space) in snd_hwdep_poll_descriptors() argument
270 pfds->fd = hwdep->poll_fd; in snd_hwdep_poll_descriptors()
273 pfds->events = POLLOUT|POLLERR|POLLNVAL; in snd_hwdep_poll_descriptors()
276 pfds->events = POLLIN|POLLERR|POLLNVAL; in snd_hwdep_poll_descriptors()
279 pfds->events = POLLOUT|POLLIN|POLLERR|POLLNVAL; in snd_hwdep_poll_descriptors()
297 int snd_hwdep_poll_descriptors_revents(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int nfds, … in snd_hwdep_poll_descriptors_revents() argument
299 assert(hwdep && pfds && revents); in snd_hwdep_poll_descriptors_revents()
301 *revents = pfds->revents; in snd_hwdep_poll_descriptors_revents()
/third_party/alsa-utils/alsactl/
Dmonitor.c244 struct pollfd *pfds; in operate_dispatcher() local
249 pfds = calloc(entry->pfd_count, sizeof(*pfds)); in operate_dispatcher()
250 if (!pfds) in operate_dispatcher()
253 count = snd_ctl_poll_descriptors(entry->handle, pfds, entry->pfd_count); in operate_dispatcher()
264 err = epoll_ctl(epfd, op, pfds[i].fd, epev); in operate_dispatcher()
269 free(pfds); in operate_dispatcher()
Ddaemon.c41 int pfds; member
116 card->pfds = snd_ctl_poll_descriptors_count(card->handle); in add_card()
117 if (card->pfds < 0) { in add_card()
393 pcount += cards[i]->pfds; in state_daemon()
409 if (k != cards[i]->pfds) { in state_daemon()
427 pfd + j, cards[i]->pfds, &revents); in state_daemon()
432 j += cards[i]->pfds; in state_daemon()
/third_party/alsa-lib/src/timer/
Dtimer.c358 int snd_timer_poll_descriptors(snd_timer_t *timer, struct pollfd *pfds, unsigned int space) in snd_timer_poll_descriptors() argument
362 pfds->fd = timer->poll_fd; in snd_timer_poll_descriptors()
365 pfds->events = POLLOUT|POLLERR|POLLNVAL; in snd_timer_poll_descriptors()
368 pfds->events = POLLIN|POLLERR|POLLNVAL; in snd_timer_poll_descriptors()
371 pfds->events = POLLOUT|POLLIN|POLLERR|POLLNVAL; in snd_timer_poll_descriptors()
389 int snd_timer_poll_descriptors_revents(snd_timer_t *timer, struct pollfd *pfds, unsigned int nfds, … in snd_timer_poll_descriptors_revents() argument
391 assert(timer && pfds && revents); in snd_timer_poll_descriptors_revents()
393 *revents = pfds->revents; in snd_timer_poll_descriptors_revents()
/third_party/alsa-lib/src/pcm/
Dpcm_direct.c322 struct pollfd pfds[max + 1]; local
344 pfds[0].fd = dmix->server_fd;
345 pfds[0].events = POLLIN | POLLERR | POLLHUP;
349 ret = poll(pfds, current + 1, 500);
350 …server_printf("DIRECT SERVER: poll ret = %i, revents[0] = 0x%x, errno = %i\n", ret, pfds[0].revent…
357 if (ret == 0 || (pfds[0].revents & (POLLERR | POLLHUP))) { /* timeout or error? */
371 if (pfds[0].revents & POLLIN) {
380 pfds[current+1].fd = sck;
381 pfds[current+1].events = POLLIN | POLLERR | POLLHUP;
389 struct pollfd *pfd = &pfds[i+1];
[all …]
Dpcm_ioplug.c52 static int snd_pcm_ioplug_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space);
53 static int snd_pcm_ioplug_poll_revents(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsi…
788 static int snd_pcm_ioplug_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space) in snd_pcm_ioplug_poll_descriptors() argument
795 err = io->data->callback->poll_descriptors(io->data, pfds, space); in snd_pcm_ioplug_poll_descriptors()
801 if (space >= 1 && pfds) { in snd_pcm_ioplug_poll_descriptors()
802 pfds->fd = pcm->poll_fd; in snd_pcm_ioplug_poll_descriptors()
803 pfds->events = pcm->poll_events | POLLERR | POLLNVAL; in snd_pcm_ioplug_poll_descriptors()
810 static int snd_pcm_ioplug_poll_revents(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsi… in snd_pcm_ioplug_poll_revents() argument
817 err = io->data->callback->poll_revents(io->data, pfds, nfds, revents); in snd_pcm_ioplug_poll_revents()
820 *revents = pfds->revents; in snd_pcm_ioplug_poll_revents()
Dpcm_generic.c64 int snd_pcm_generic_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space) in snd_pcm_generic_poll_descriptors() argument
67 return snd_pcm_poll_descriptors(generic->slave, pfds, space); in snd_pcm_generic_poll_descriptors()
70 int snd_pcm_generic_poll_revents(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned s… in snd_pcm_generic_poll_revents() argument
73 return snd_pcm_poll_descriptors_revents(generic->slave, pfds, nfds, revents); in snd_pcm_generic_poll_revents()
/third_party/ltp/testcases/kernel/syscalls/poll/
Dpoll02.c22 struct pollfd pfds[] = { in sample_fn() local
27 TEST(poll(pfds, 1, sleep_ms)); in sample_fn()
/third_party/alsa-utils/seq/aseqdump/
Daseqdump.c364 struct pollfd *pfds; in main() local
418 pfds = alloca(sizeof(*pfds) * npfds); in main()
420 snd_seq_poll_descriptors(seq, pfds, npfds, POLLIN); in main()
421 if (poll(pfds, npfds, -1) < 0) in main()
/third_party/alsa-lib/src/control/
Dcontrol_ext.c437 static int snd_ctl_ext_poll_descriptors(snd_ctl_t *handle, struct pollfd *pfds, unsigned int space) in snd_ctl_ext_poll_descriptors() argument
442 return ext->callback->poll_descriptors(ext, pfds, space); in snd_ctl_ext_poll_descriptors()
446 pfds->fd = ext->poll_fd; in snd_ctl_ext_poll_descriptors()
447 pfds->events = POLLIN|POLLERR|POLLNVAL; in snd_ctl_ext_poll_descriptors()
453 static int snd_ctl_ext_poll_revents(snd_ctl_t *handle, struct pollfd *pfds, unsigned int nfds, unsi… in snd_ctl_ext_poll_revents() argument
458 return ext->callback->poll_revents(ext, pfds, nfds, revents); in snd_ctl_ext_poll_revents()
460 *revents = pfds->revents; in snd_ctl_ext_poll_revents()
Dcontrol_local.h54 int (*poll_descriptors)(snd_ctl_t *handle, struct pollfd *pfds, unsigned int space);
55 …int (*poll_revents)(snd_ctl_t *handle, struct pollfd *pfds, unsigned int nfds, unsigned short *rev…
/third_party/libuv/src/unix/
Dos390-syscalls.c285 struct pollfd* pfds; in epoll_wait() local
311 pfds = lst->items; in epoll_wait()
312 pollret = poll(pfds, size, timeout); in epoll_wait()
322 msg_fd = pfds[lst->size - 1]; in epoll_wait()
328 pfd = &pfds[i]; in epoll_wait()
/third_party/alsa-lib/src/rawmidi/
Drawmidi.c429 int snd_rawmidi_poll_descriptors(snd_rawmidi_t *rawmidi, struct pollfd *pfds, unsigned int space) in snd_rawmidi_poll_descriptors() argument
433 pfds->fd = rawmidi->poll_fd; in snd_rawmidi_poll_descriptors()
434pfds->events = rawmidi->stream == SND_RAWMIDI_STREAM_OUTPUT ? (POLLOUT|POLLERR|POLLNVAL) : (POLLIN… in snd_rawmidi_poll_descriptors()
448 int snd_rawmidi_poll_descriptors_revents(snd_rawmidi_t *rawmidi, struct pollfd *pfds, unsigned int … in snd_rawmidi_poll_descriptors_revents() argument
450 assert(rawmidi && pfds && revents); in snd_rawmidi_poll_descriptors_revents()
452 *revents = pfds->revents; in snd_rawmidi_poll_descriptors_revents()
/third_party/alsa-lib/include/
Dhwdep.h110 int snd_hwdep_poll_descriptors(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int space);
112 int snd_hwdep_poll_descriptors_revents(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int nfds, …
Dcontrol_external.h249 int (*poll_descriptors)(snd_ctl_ext_t *ext, struct pollfd *pfds, unsigned int space);
253 …int (*poll_revents)(snd_ctl_ext_t *ext, struct pollfd *pfds, unsigned int nfds, unsigned short *re…

123