Home
last modified time | relevance | path

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

/linux/tools/testing/selftests/drivers/net/
H A Dpsp_responder.c126 struct pollfd pfds[3]; in run_session() local
134 memset(pfds, 0, sizeof(pfds)); in run_session()
136 pfds[0].fd = server_sock; in run_session()
137 pfds[0].events = POLLIN; in run_session()
139 pfds[1].fd = comm_sock; in run_session()
140 pfds[1].events = POLLIN; in run_session()
144 pfds[2].fd = data_sock; in run_session()
145 pfds[2].events = POLLIN; in run_session()
150 if (poll(pfds, nfds, -1) < 0) { in run_session()
156 if (pfds[2].revents & POLLIN) { in run_session()
[all …]
/linux/samples/uhid/
H A Duhid-example.c391 struct pollfd pfds[2]; in main() local
429 pfds[0].fd = STDIN_FILENO; in main()
430 pfds[0].events = POLLIN; in main()
431 pfds[1].fd = fd; in main()
432 pfds[1].events = POLLIN; in main()
436 ret = poll(pfds, 2, -1); in main()
441 if (pfds[0].revents & POLLHUP) { in main()
445 if (pfds[1].revents & POLLHUP) { in main()
450 if (pfds[0].revents & POLLIN) { in main()
455 if (pfds[1].revents & POLLIN) { in main()
/linux/tools/usb/ffs-aio-example/simple/device_app/
H A Daio_simple.c187 struct pollfd pfds[1]; in handle_ep0() local
188 pfds[0].fd = ep0; in handle_ep0()
189 pfds[0].events = POLLIN; in handle_ep0()
191 ret = poll(pfds, 1, 0); in handle_ep0()
193 if (ret && (pfds[0].revents & POLLIN)) { in handle_ep0()
/linux/tools/lib/api/
H A Dio.h55 struct pollfd pfds[] = { in io__fill_buffer() local
62 n = poll(pfds, 1, io->timeout_ms); in io__fill_buffer()
65 if (n > 0 && !(pfds[0].revents & POLLIN)) { in io__fill_buffer()
/linux/tools/testing/selftests/hid/
H A Dhid_common.h255 struct pollfd pfds[1]; in uhid_read_events_thread() local
259 pfds[0].fd = fd; in uhid_read_events_thread()
260 pfds[0].events = POLLIN; in uhid_read_events_thread()
265 ret = poll(pfds, 1, 100); in uhid_read_events_thread()
270 if (pfds[0].revents & POLLIN) { in uhid_read_events_thread()
H A Dhidraw.c140 struct pollfd pfds[1]; in TEST_F() local
145 pfds[0].fd = self->hidraw_fd; in TEST_F()
146 pfds[0].events = POLLIN; in TEST_F()
154 ready = poll(pfds, 1, 5000); in TEST_F()
157 if (pfds[0].revents & POLLIN) { in TEST_F()
172 ASSERT_TRUE(pfds[0].revents & POLLHUP); in TEST_F()
/linux/tools/perf/tests/
H A Dbuiltin-test.c434 struct pollfd pfds[1] = { in finish_test() local
468 poll(pfds, ARRAY_SIZE(pfds), /*timeout=*/100); in finish_test()
469 if (pfds[0].revents) { in finish_test()