/bionic/tests/ |
D | sys_sendfile_test.cpp | 29 ASSERT_EQ(5, TEMP_FAILURE_RETRY(write(src_file.fd, "hello", 5))); in TEST() 42 ASSERT_EQ(2, TEMP_FAILURE_RETRY(read(dst_file.fd, &buf, 2))); in TEST() 48 ASSERT_EQ(5, TEMP_FAILURE_RETRY(write(src_file.fd, "hello", 5))); in TEST() 61 ASSERT_EQ(2, TEMP_FAILURE_RETRY(read(dst_file.fd, &buf, 2))); in TEST()
|
D | sys_ptrace_test.cpp | 56 TEMP_FAILURE_RETRY(waitpid(pid, &status, 0)); in ~ChildGuard() 182 ASSERT_EQ(child, TEMP_FAILURE_RETRY(waitpid(child, &status, __WALL))) << strerror(errno); in run_watchpoint_test() 194 ASSERT_EQ(child, TEMP_FAILURE_RETRY(waitpid(child, &status, __WALL))) << strerror(errno); in run_watchpoint_test() 356 ASSERT_EQ(child, TEMP_FAILURE_RETRY(waitpid(child, &status, __WALL))) << strerror(errno); in TEST() 368 ASSERT_EQ(child, TEMP_FAILURE_RETRY(waitpid(child, &status, __WALL))) << strerror(errno); in TEST() 413 TEMP_FAILURE_RETRY(read(worker_pipe_read.get(), &buf, sizeof(buf))); in PtraceResumptionTest() 419 TEMP_FAILURE_RETRY(read(worker_pipe_setup_read.get(), &buf, sizeof(buf))); in PtraceResumptionTest() 446 pid_t rc = TEMP_FAILURE_RETRY(waitpid(tracer, &result, 0)); in WaitForTracer() 473 pid_t rc = TEMP_FAILURE_RETRY(waitpid(worker, &result, WNOHANG)); in WaitForWorker() 481 rc = TEMP_FAILURE_RETRY(waitpid(worker, &result, 0)); in WaitForWorker() [all …]
|
D | utils.h | 173 ASSERT_EQ(pid, TEMP_FAILURE_RETRY(waitpid(pid, &status, 0))) << *error_msg; 248 while ((bytes_read = TEMP_FAILURE_RETRY(read(fds[0], buf, sizeof(buf)))) > 0) { in Run()
|
D | malloc_iterate_test.cpp | 259 pid_t wait_pid = TEMP_FAILURE_RETRY(waitpid(pid, nullptr, WNOHANG)); in TEST()
|
/bionic/libc/bionic/ |
D | getentropy.cpp | 37 ScopedFd fd(TEMP_FAILURE_RETRY(open("/dev/urandom", O_RDONLY | O_NOFOLLOW | O_CLOEXEC, 0))); in getentropy_urandom() 42 ssize_t count = TEMP_FAILURE_RETRY(read(fd.get(), static_cast<char*>(buffer) + collected, in getentropy_urandom() 62 long count = TEMP_FAILURE_RETRY(getrandom(static_cast<char*>(buffer) + collected, in getentropy()
|
D | bionic_netlink.cpp | 73 return (TEMP_FAILURE_RETRY(send(fd_.get(), &request, sizeof(request), 0)) == sizeof(request)); in SendRequest() 79 while ((bytes_read = TEMP_FAILURE_RETRY(recv(fd_.get(), data_, size_, 0))) > 0) { in ReadResponses()
|
D | bionic_systrace.cpp | 78 TEMP_FAILURE_RETRY(write(trace_marker_fd, buf, len)); in trace_begin_internal() 120 TEMP_FAILURE_RETRY(write(trace_marker_fd, const_cast<const char*>(buf), 2)); in trace_end_internal()
|
D | pthread_setname_np.cpp | 68 ssize_t n = TEMP_FAILURE_RETRY(read(fd, buf, buf_size)); in pthread_getname_np() 101 ssize_t n = TEMP_FAILURE_RETRY(write(fd, thread_name, thread_name_len)); in pthread_setname_np()
|
D | system_property_set.cpp | 83 if (TEMP_FAILURE_RETRY(connect(socket_.get(), in PropertyServiceConnection() 99 int result = TEMP_FAILURE_RETRY(recv(socket_.get(), value, sizeof(*value), MSG_WAITALL)); in RecvInt32() 200 const int num_bytes = TEMP_FAILURE_RETRY(send(s, msg, sizeof(prop_msg), 0)); in send_prop_msg() 212 const int poll_result = TEMP_FAILURE_RETRY(poll(pollfds, 1, 250 /* ms */)); in send_prop_msg()
|
D | libc_init_common.cpp | 203 if (TEMP_FAILURE_RETRY(fcntl(i, F_GETFL)) == -1) { in __nullify_closed_stdio() 213 if (((fd = TEMP_FAILURE_RETRY(open("/dev/null", O_RDWR))) == -1 && in __nullify_closed_stdio() 214 (fd = TEMP_FAILURE_RETRY(open("/sys/fs/selinux/null", O_RDWR))) == -1) || in __nullify_closed_stdio()
|
D | netinet_in.cpp | 64 int rc = TEMP_FAILURE_RETRY(bind(sd, reinterpret_cast<sockaddr*>(sin), sizeof(*sin))); in bindresvport()
|
D | system.cpp | 69 pid_t pid = TEMP_FAILURE_RETRY(waitpid(child, &status, 0)); in system()
|
D | dirent.cpp | 109 int rc = TEMP_FAILURE_RETRY(__getdents64(d->fd_, d->buff_, sizeof(d->buff_))); in __fill_DIR()
|
D | pthread_internal.cpp | 266 if (TEMP_FAILURE_RETRY(sem_wait(&g_sem)) != 0) { in android_run_on_all_threads()
|
/bionic/libc/tzcode/ |
D | bionic.cpp | 134 int fd = TEMP_FAILURE_RETRY(open(path, O_RDONLY | O_CLOEXEC)); in __bionic_open_tzdata_path() 142 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd, &header, sizeof(header))); in __bionic_open_tzdata_path() 156 if (TEMP_FAILURE_RETRY(lseek(fd, ntohl(header.index_offset), SEEK_SET)) == -1) { in __bionic_open_tzdata_path() 181 if (TEMP_FAILURE_RETRY(read(fd, index, index_size)) != static_cast<ssize_t>(index_size)) { in __bionic_open_tzdata_path() 227 if (TEMP_FAILURE_RETRY(lseek(fd, specific_zone_offset, SEEK_SET)) == -1) { in __bionic_open_tzdata_path()
|
/bionic/linker/ |
D | linker_crt_pad_segment_test.cpp | 58 unique_fd fd{TEMP_FAILURE_RETRY(open(path.c_str(), O_CLOEXEC | O_RDWR))}; in GetPadSegment() 62 EXPECT_NE(TEMP_FAILURE_RETRY(fstat(fd.get(), &file_stat)), -1) in GetPadSegment()
|
D | linker_main.cpp | 216 if (TEMP_FAILURE_RETRY(stat(exe_path, &result.file_stat) == -1)) { in get_executable_info() 218 if (TEMP_FAILURE_RETRY(stat(arg_path, &result.file_stat) == -1)) { in get_executable_info() 279 if (TEMP_FAILURE_RETRY(fstat(fd.get(), &result.file_stat)) == -1) { in load_executable()
|
D | linker_phdr.cpp | 224 ssize_t rc = TEMP_FAILURE_RETRY(pread64(fd_, &header_, sizeof(header_), file_offset_)); in ReadElfHeader() 1219 ssize_t written = TEMP_FAILURE_RETRY(write(fd, reinterpret_cast<void*>(seg_page_start), size)); in phdr_table_serialize_gnu_relro() 1257 if (TEMP_FAILURE_RETRY(fstat(fd, &file_stat)) != 0) { in phdr_table_map_gnu_relro()
|
/bionic/libc/async_safe/ |
D | async_safe_log.cpp | 123 ssize_t bytes = TEMP_FAILURE_RETRY(write(fd_, data, len)); in Send() 494 int result = TEMP_FAILURE_RETRY(writev(STDERR_FILENO, vec, 4)); in write_stderr() 505 int log_fd = TEMP_FAILURE_RETRY(__socket(PF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0)); in open_log_socket() 518 if (TEMP_FAILURE_RETRY(connect(log_fd, &u.addr, sizeof(u.addrUn))) != 0) { in open_log_socket() 560 int result = TEMP_FAILURE_RETRY(writev(main_log_fd, vec, sizeof(vec) / sizeof(vec[0]))); in async_safe_write_log() 596 TEMP_FAILURE_RETRY(writev(2, iov, 2)); in async_safe_fatal_va_list()
|
/bionic/docs/ |
D | EINTR.md | 57 `TEMP_FAILURE_RETRY` macro. This is basically a while loop that retries the 63 n = TEMP_FAILURE_RETRY(read(fd, buf, buf_size)); // GOOD! 68 TL;DR: *never* wrap close(2) calls with `TEMP_FAILURE_RETRY`. 85 everything with `TEMP_FAILURE_RETRY()`" doesn't work. Because some amount of
|
/bionic/benchmarks/spawn/ |
D | spawn_benchmark.cpp | 52 const pid_t wait_result = TEMP_FAILURE_RETRY(waitpid(child, &wstatus, 0)); in BM_spawn_test()
|
/bionic/benchmarks/tests/ |
D | interface_test.cpp | 124 ssize_t bytes = TEMP_FAILURE_RETRY(read(fd_, buffer, sizeof(buffer) - 1)); in RunTest() 138 ASSERT_EQ(pid_, TEMP_FAILURE_RETRY(waitpid(pid_, &status, 0))) << "Test output:\n" << raw_output_; in RunTest()
|
/bionic/libc/stdio/ |
D | stdio.cpp | 427 if (TEMP_FAILURE_RETRY(wait4(pid, &status, 0, nullptr)) != -1) { in __FILE_close() 528 return TEMP_FAILURE_RETRY(read(fp->_file, buf, n)); in __sread() 533 return TEMP_FAILURE_RETRY(write(fp->_file, buf, n)); in __swrite() 538 return TEMP_FAILURE_RETRY(lseek(fp->_file, offset, whence)); in __sseek() 543 return TEMP_FAILURE_RETRY(lseek64(fp->_file, offset, whence)); in __sseek64()
|
/bionic/libc/malloc_debug/tests/ |
D | malloc_debug_system_tests.cpp | 292 if (TEMP_FAILURE_RETRY(poll(&read_fd, 1, 1)) > 0) { in InternalExec() 293 ssize_t bytes = TEMP_FAILURE_RETRY(read(fds[0], buffer.data(), sizeof(buffer) - 1)); in InternalExec()
|
/bionic/libc/include/ |
D | unistd.h | 378 #define TEMP_FAILURE_RETRY(exp) ({ \ macro
|