Lines Matching refs:fd
28 int fd = eventfd(kInitialValue, EFD_NONBLOCK); in TEST() local
29 ASSERT_NE(-1, fd); in TEST()
32 ASSERT_EQ(0, eventfd_read(fd, &value)); in TEST()
36 ASSERT_EQ(-1, eventfd_read(fd, &value)); in TEST()
40 ASSERT_EQ(0, eventfd_write(fd, 1)); in TEST()
41 ASSERT_EQ(0, eventfd_write(fd, 1)); in TEST()
42 ASSERT_EQ(0, eventfd_write(fd, 1)); in TEST()
44 ASSERT_EQ(0, eventfd_read(fd, &value)); in TEST()
47 close(fd); in TEST()
52 int fd = eventfd(kInitialValue, EFD_CLOEXEC); in TEST() local
53 ASSERT_NE(-1, fd); in TEST()
54 AssertCloseOnExec(fd, true); in TEST()
57 ASSERT_EQ(0, eventfd_read(fd, &value)); in TEST()
60 close(fd); in TEST()
62 fd = eventfd(kInitialValue, EFD_NONBLOCK | EFD_CLOEXEC); in TEST()
63 ASSERT_NE(-1, fd); in TEST()
64 AssertCloseOnExec(fd, true); in TEST()
67 ASSERT_EQ(0, eventfd_read(fd, &value)); in TEST()
70 close(fd); in TEST()
74 int fd = eventfd(3, EFD_NONBLOCK | EFD_SEMAPHORE); in TEST() local
75 ASSERT_NE(-1, fd); in TEST()
78 ASSERT_EQ(0, eventfd_read(fd, &value)); in TEST()
82 ASSERT_EQ(0, eventfd_read(fd, &value)); in TEST()
86 ASSERT_EQ(0, eventfd_read(fd, &value)); in TEST()
90 ASSERT_EQ(-1, eventfd_read(fd, &value)); in TEST()
93 close(fd); in TEST()