Home
last modified time | relevance | path

Searched refs:fds (Results 1 – 11 of 11) sorted by relevance

/bionic/libc/include/bits/fortify/
Dpoll.h41 int poll(struct pollfd* const fds __pass_object_size, nfds_t fd_count, int timeout) in poll()
43 __clang_error_if(__bos(fds) != __BIONIC_FORTIFY_UNKNOWN_SIZE && in poll()
44 __bos(fds) < sizeof(*fds) * fd_count, in poll()
46 size_t bos_fds = __bos(fds); in poll()
49 return __call_bypassing_fortify(poll)(fds, fd_count, timeout); in poll()
51 return __poll_chk(fds, fd_count, timeout, bos_fds); in poll()
55 int ppoll(struct pollfd* const fds __pass_object_size, nfds_t fd_count, const struct timespec* time… in ppoll()
57 __clang_error_if(__bos(fds) != __BIONIC_FORTIFY_UNKNOWN_SIZE && in ppoll()
58 __bos(fds) < sizeof(*fds) * fd_count, in ppoll()
60 size_t bos_fds = __bos(fds); in ppoll()
[all …]
/bionic/tests/
Dsys_select_test.cpp29 fd_set fds; in TEST() local
30 FD_ZERO(&fds); in TEST()
33 EXPECT_FALSE(FD_ISSET(i, &fds)); in TEST()
36 FD_SET(0, &fds); in TEST()
37 EXPECT_TRUE(FD_ISSET(0, &fds)); in TEST()
38 EXPECT_FALSE(FD_ISSET(1, &fds)); in TEST()
39 FD_SET(1, &fds); in TEST()
40 EXPECT_TRUE(FD_ISSET(0, &fds)); in TEST()
41 EXPECT_TRUE(FD_ISSET(1, &fds)); in TEST()
42 FD_CLR(0, &fds); in TEST()
[all …]
Dsys_epoll_test.cpp60 int fds[2]; in TEST() local
61 ASSERT_NE(-1, pipe(fds)); in TEST()
69 ASSERT_NE(-1, epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fds[0], &ev)); in TEST()
72 ASSERT_EQ(1, write(fds[1], "\n", 1)); in TEST()
79 close(fds[0]); in TEST()
80 close(fds[1]); in TEST()
Dutils.h197 int fds[2]; in Run() local
198 ASSERT_NE(pipe(fds), -1); in Run()
205 close(fds[0]); in Run()
206 dup2(fds[1], STDOUT_FILENO); in Run()
207 dup2(fds[1], STDERR_FILENO); in Run()
208 if (fds[1] != STDOUT_FILENO && fds[1] != STDERR_FILENO) close(fds[1]); in Run()
214 close(fds[1]); in Run()
218 while ((bytes_read = TEMP_FAILURE_RETRY(read(fds[0], buf, sizeof(buf)))) > 0) { in Run()
221 close(fds[0]); in Run()
Dspawn_test.cpp231 int fds[2]; in TEST() local
232 ASSERT_NE(-1, pipe(fds)); in TEST()
237 ASSERT_EQ(0, posix_spawn_file_actions_addclose(&fa, fds[0])); in TEST()
238 ASSERT_EQ(0, posix_spawn_file_actions_adddup2(&fa, fds[1], 1)); in TEST()
239 ASSERT_EQ(0, posix_spawn_file_actions_addclose(&fa, fds[1])); in TEST()
241 ASSERT_EQ(0, posix_spawn_file_actions_addclose(&fa, fds[1])); in TEST()
250 ASSERT_EQ(0, close(fds[1])); in TEST()
252 ASSERT_TRUE(android::base::ReadFdToString(fds[0], &content)); in TEST()
253 ASSERT_EQ(0, close(fds[0])); in TEST()
267 int fds[2]; in CatFileToString() local
[all …]
Dfortify_filecheck_diagnostics_test.cpp268 pollfd fds[1]; in test_poll() local
272 poll(fds, 2, 0); in test_poll()
276 pollfd fds[1]; in test_ppoll() local
281 ppoll(fds, 2, &timeout, NULL); in test_ppoll()
Difaddrs_test.cpp293 std::vector<int> fds; in TEST() local
300 fds.push_back(fd); in TEST()
307 for (int fd : fds) close(fd); in TEST()
/bionic/benchmarks/tests/
Dinterface_test.cpp79 int fds[2]; in Exec() local
80 ASSERT_NE(-1, pipe(fds)); in Exec()
81 ASSERT_NE(-1, fcntl(fds[0], F_SETFL, O_NONBLOCK)); in Exec()
85 close(fds[0]); in Exec()
89 ASSERT_NE(0, dup2(fds[1], STDOUT_FILENO)); in Exec()
90 ASSERT_NE(0, dup2(fds[1], STDERR_FILENO)); in Exec()
91 close(fds[1]); in Exec()
102 close(fds[1]); in Exec()
103 fd_ = fds[0]; in Exec()
/bionic/libc/bionic/
Dpoll.cpp40 int poll(pollfd* fds, nfds_t fd_count, int ms) { in poll() argument
47 return __ppoll(fds, fd_count, ts_ptr, nullptr, 0); in poll()
50 int ppoll(pollfd* fds, nfds_t fd_count, const timespec* ts, const sigset_t* ss) { in ppoll() argument
59 return ppoll64(fds, fd_count, ts, ss_ptr); in ppoll()
62 int ppoll64(pollfd* fds, nfds_t fd_count, const timespec* ts, const sigset64_t* ss) { in ppoll64() argument
78 return __ppoll(fds, fd_count, mutable_ts_ptr, mutable_ss_ptr, sizeof(*mutable_ss_ptr)); in ppoll64()
Dfortify.cpp161 int __poll_chk(pollfd* fds, nfds_t fd_count, int timeout, size_t fds_size) { in __poll_chk() argument
163 return poll(fds, fd_count, timeout); in __poll_chk()
166 int __ppoll_chk(pollfd* fds, nfds_t fd_count, const timespec* timeout, in __ppoll_chk() argument
169 return ppoll(fds, fd_count, timeout, mask); in __ppoll_chk()
/bionic/libc/
DSECCOMP_WHITELIST_COMMON.TXT92 int poll:poll(struct pollfd *fds, nfds_t nfds, int timeout) arm,x86,mips