Home
last modified time | relevance | path

Searched refs:pfds (Results 1 - 25 of 52) sorted by relevance

123

/third_party/ltp/testcases/kernel/syscalls/lseek/
H A 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-utils/axfer/
H A 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()
H A 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()
H A Dwaiter-select.c57 pfd = &waiter->pfds[i]; in select_wait_event()
83 pfd = &waiter->pfds[i]; in select_wait_event()
/third_party/alsa-lib/test/
H A 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[ in event_sender()
[all...]
H A Dplaymidi1.c122 struct pollfd *pfds = alloca(sizeof(*pfds) * npfds); in write_ev() local
123 snd_seq_poll_descriptors(seq_handle, pfds, npfds, POLLOUT); in write_ev()
124 if ((rc = poll(pfds, npfds, -1)) < 0) { in write_ev()
380 struct pollfd *pfds = alloca(sizeof(*pfds) * npfds); in wait_for_event() local
381 snd_seq_poll_descriptors(seq_handle, pfds, npfds, POLLIN); in wait_for_event()
382 if ((left = poll(pfds, npfds, -1)) < 0) { in wait_for_event()
H A 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/amidi/
H A Damidi.c650 struct pollfd *pfds; in main() local
653 pfds = alloca(npfds * sizeof(struct pollfd)); in main()
656 pfds[0].fd = timerfd_create(CLOCK_MONOTONIC, 0); in main()
657 if (pfds[0].fd == -1) { in main()
661 pfds[0].events = POLLIN; in main()
663 pfds[0].fd = -1; in main()
666 snd_rawmidi_poll_descriptors(input, &pfds[1], npfds - 1); in main()
675 err = timerfd_settime(pfds[0].fd, 0, &itimerspec, NULL); in main()
688 err = poll(pfds, npfds, -1); in main()
701 err = snd_rawmidi_poll_descriptors_revents(input, &pfds[ in main()
[all...]
/third_party/toybox/toys/pending/
H A 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-utils/alsactl/
H A Dmonitor.c245 struct pollfd *pfds; in operate_dispatcher() local
250 pfds = calloc(entry->pfd_count, sizeof(*pfds)); in operate_dispatcher()
251 if (!pfds) in operate_dispatcher()
254 count = snd_ctl_poll_descriptors(entry->handle, pfds, entry->pfd_count); in operate_dispatcher()
265 err = epoll_ctl(epfd, op, pfds[i].fd, epev); in operate_dispatcher()
270 free(pfds); in operate_dispatcher()
H A 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/mixer/
H A Dmixer.c717 * \param pfds array of poll descriptors
721 int snd_mixer_poll_descriptors(snd_mixer_t *mixer, struct pollfd *pfds, unsigned int space) in snd_mixer_poll_descriptors() argument
730 n = snd_hctl_poll_descriptors(s->hctl, pfds, space); in snd_mixer_poll_descriptors()
736 pfds += n; in snd_mixer_poll_descriptors()
746 * \param pfds array of poll descriptors
751 int snd_mixer_poll_descriptors_revents(snd_mixer_t *mixer, struct pollfd *pfds, unsigned int nfds, unsigned short *revents) in snd_mixer_poll_descriptors_revents() argument
755 assert(mixer && pfds && revents); in snd_mixer_poll_descriptors_revents()
759 for (idx = 0; idx < nfds; idx++, pfds++) in snd_mixer_poll_descriptors_revents()
760 res |= pfds->revents & (POLLIN|POLLERR|POLLNVAL); in snd_mixer_poll_descriptors_revents()
774 struct pollfd *pfds in snd_mixer_wait() local
[all...]
/third_party/alsa-lib/src/hwdep/
H A Dhwdep.c262 * \param pfds array of poll descriptors
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()
292 * \param pfds array of poll descriptors
297 int snd_hwdep_poll_descriptors_revents(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int nfds, unsigned short *revents) in snd_hwdep_poll_descriptors_revents() argument
299 assert(hwdep && pfds && revents); in snd_hwdep_poll_descriptors_revents()
301 *revents = pfds in snd_hwdep_poll_descriptors_revents()
[all...]
/third_party/alsa-lib/src/timer/
H A Dtimer.c354 * \param pfds array of poll descriptors
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()
384 * \param pfds array of poll descriptors
389 int snd_timer_poll_descriptors_revents(snd_timer_t *timer, struct pollfd *pfds, unsigned int nfds, unsigned short *revents) in snd_timer_poll_descriptors_revents() argument
391 assert(timer && pfds && revents); in snd_timer_poll_descriptors_revents()
393 *revents = pfds in snd_timer_poll_descriptors_revents()
[all...]
/third_party/ltp/testcases/kernel/syscalls/poll/
H A Dpoll02.c22 struct pollfd pfds[] = { in sample_fn() local
27 TEST(poll(pfds, 1, sleep_ms)); in sample_fn()
/third_party/alsa-lib/src/control/
H A 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, unsigned short *revents) 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()
/third_party/alsa-lib/src/pcm/
H A Dpcm_direct.c327 struct pollfd pfds[max + 1]; local
349 pfds[0].fd = dmix->server_fd;
350 pfds[0].events = POLLIN | POLLERR | POLLHUP;
354 ret = poll(pfds, current + 1, 500);
355 server_printf("DIRECT SERVER: poll ret = %i, revents[0] = 0x%x, errno = %i\n", ret, pfds[0].revents, errno);
362 if (ret == 0 || (pfds[0].revents & (POLLERR | POLLHUP))) { /* timeout or error? */
376 if (pfds[0].revents & POLLIN) {
385 pfds[current+1].fd = sck;
386 pfds[current+1].events = POLLIN | POLLERR | POLLHUP;
394 struct pollfd *pfd = &pfds[
726 snd_pcm_direct_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space) global() argument
751 snd_pcm_direct_poll_revents(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents) global() argument
[all...]
H A 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 short *revents) 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()
H A 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, unsigned short *revents);
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, unsigned short *revents) 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 in snd_pcm_ioplug_poll_revents()
[all...]
/third_party/alsa-lib/src/rawmidi/
H A Dump.c154 * \param pfds array of poll descriptors
158 int snd_ump_poll_descriptors(snd_ump_t *ump, struct pollfd *pfds, in snd_ump_poll_descriptors() argument
161 return snd_rawmidi_poll_descriptors(ump->rawmidi, pfds, space); in snd_ump_poll_descriptors()
167 * \param pfds array of poll descriptors
172 int snd_ump_poll_descriptors_revents(snd_ump_t *ump, struct pollfd *pfds, in snd_ump_poll_descriptors_revents() argument
175 return snd_rawmidi_poll_descriptors_revents(ump->rawmidi, pfds, nfds, in snd_ump_poll_descriptors_revents()
H A Drawmidi.c426 * \param pfds array of poll descriptors
430 int snd_rawmidi_poll_descriptors(snd_rawmidi_t *rawmidi, struct pollfd *pfds, unsigned int space) in snd_rawmidi_poll_descriptors() argument
434 pfds->fd = rawmidi->poll_fd; in snd_rawmidi_poll_descriptors()
435 pfds->events = rawmidi->stream == SND_RAWMIDI_STREAM_OUTPUT ? (POLLOUT|POLLERR|POLLNVAL) : (POLLIN|POLLERR|POLLNVAL); in snd_rawmidi_poll_descriptors()
444 * \param pfds array of poll descriptors
449 int snd_rawmidi_poll_descriptors_revents(snd_rawmidi_t *rawmidi, struct pollfd *pfds, unsigned int nfds, unsigned short *revents) in snd_rawmidi_poll_descriptors_revents() argument
451 assert(rawmidi && pfds && revents); in snd_rawmidi_poll_descriptors_revents()
453 *revents = pfds->revents; in snd_rawmidi_poll_descriptors_revents()
/third_party/libuv/src/unix/
H A 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()
321 msg_fd = pfds[lst->size - 1]; /* message queue is always last entry */ in epoll_wait()
330 pfd = &pfds[i]; in epoll_wait()
/third_party/node/deps/uv/src/unix/
H A 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()
321 msg_fd = pfds[lst->size - 1]; /* message queue is always last entry */ in epoll_wait()
330 pfd = &pfds[i]; in epoll_wait()
/third_party/alsa-lib/include/
H A 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 *revents);
H A 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, unsigned short *revents);

Completed in 19 milliseconds

123