Lines Matching refs:fd
9 void reopen(int *fd, int initval, int flags) in reopen() argument
11 zassert_not_null(fd); in reopen()
12 zassert_ok(close(*fd)); in reopen()
13 *fd = eventfd(initval, flags); in reopen()
14 zassert_true(*fd >= 0, "eventfd(%d, %d) failed: %d", initval, flags, errno); in reopen()
17 int is_blocked(int fd, short *event) in is_blocked() argument
22 pfd.fd = fd; in is_blocked()
33 void eventfd_poll_unset_common(int fd) in eventfd_poll_unset_common() argument
40 ret = is_blocked(fd, &event); in eventfd_poll_unset_common()
43 ret = eventfd_write(fd, TESTVAL); in eventfd_poll_unset_common()
47 ret = is_blocked(fd, &event); in eventfd_poll_unset_common()
51 ret = eventfd_write(fd, TESTVAL); in eventfd_poll_unset_common()
54 ret = eventfd_read(fd, &val); in eventfd_poll_unset_common()
61 ret = is_blocked(fd, &event); in eventfd_poll_unset_common()
65 void eventfd_poll_set_common(int fd) in eventfd_poll_set_common() argument
72 ret = is_blocked(fd, &event); in eventfd_poll_set_common()
75 ret = eventfd_read(fd, &val); in eventfd_poll_set_common()
80 ret = is_blocked(fd, &event); in eventfd_poll_set_common()
88 efd_fixture.fd = -1; in setup()
96 fixture->fd = eventfd(0, 0); in before()
97 zassert_true(fixture->fd >= 0, "eventfd(0, 0) failed: %d", errno); in before()
104 close(fixture->fd); in after()
105 fixture->fd = -1; in after()