/third_party/ltp/testcases/kernel/syscalls/lseek/ |
D | lseek02.c | 28 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/ |
D | seq-sender.c | 149 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()
|
D | playmidi1.c | 120 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()
|
D | seq-decoder.c | 268 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/ |
D | waiter.c | 72 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()
|
D | waiter-epoll.c | 41 .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()
|
D | waiter-select.c | 57 pfd = &waiter->pfds[i]; in select_wait_event() 83 pfd = &waiter->pfds[i]; in select_wait_event()
|
/third_party/alsa-utils/amidi/ |
D | amidi.c | 648 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/ |
D | telnet.c | 291 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/ |
D | mixer.c | 710 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/ |
D | hwdep.c | 266 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/ |
D | monitor.c | 244 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()
|
D | daemon.c | 41 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/ |
D | timer.c | 358 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/ |
D | pcm_direct.c | 322 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 …]
|
D | pcm_ioplug.c | 52 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()
|
D | pcm_generic.c | 64 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/ |
D | poll02.c | 22 struct pollfd pfds[] = { in sample_fn() local 27 TEST(poll(pfds, 1, sleep_ms)); in sample_fn()
|
/third_party/alsa-utils/seq/aseqdump/ |
D | aseqdump.c | 364 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/ |
D | control_ext.c | 437 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()
|
D | control_local.h | 54 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/ |
D | os390-syscalls.c | 285 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/ |
D | rawmidi.c | 429 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() 434 …pfds->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/ |
D | hwdep.h | 110 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, …
|
D | control_external.h | 249 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…
|