Lines Matching defs:fds
9 struct pollfd fds[4];
27 fds[0] = (struct pollfd){.fd = -1, .events = 0, .revents = 0};
29 ret = poll(fds, 1, 2000);
38 fds[0] = (struct pollfd){.fd = 1, .events = POLLOUT, .revents = 0};
39 fds[1] = (struct pollfd){.fd = 2, .events = POLLOUT, .revents = 0};
41 ret = poll(fds, 2, -1);
43 assert(fds[0].revents == POLLOUT);
44 assert(fds[1].revents == POLLOUT);
47 fds[0] = (struct pollfd){.fd = 1, .events = POLLOUT, .revents = 0};
48 fds[1] = (struct pollfd){.fd = 2, .events = POLLOUT, .revents = 0};
49 fds[2] = (struct pollfd){.fd = 1, .events = POLLOUT, .revents = 0};
50 fds[3] = (struct pollfd){.fd = 1, .events = POLLIN, .revents = 0};
52 ret = poll(fds, 2, -1);
54 assert(fds[0].revents == POLLOUT);
55 assert(fds[1].revents == POLLOUT);
56 assert(fds[2].revents == 0);
57 assert(fds[3].revents == 0);
63 fds[0] = (struct pollfd){.fd = 0, .events = POLLIN, .revents = 0};
64 ret = poll(fds, 1, 2000);
68 assert(fds[0].revents == POLLIN);
70 assert(fds[0].revents == (POLLHUP | POLLIN));