Home
last modified time | relevance | path

Searched refs:TEMP_FAILURE_RETRY (Results 1 – 25 of 32) sorted by relevance

12

/bionic/tests/
Dsys_sendfile_test.cpp29 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()
Dsys_ptrace_test.cpp56 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 …]
Dutils.h173 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()
Dmalloc_iterate_test.cpp259 pid_t wait_pid = TEMP_FAILURE_RETRY(waitpid(pid, nullptr, WNOHANG)); in TEST()
/bionic/libc/bionic/
Dgetentropy.cpp37 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()
Dbionic_netlink.cpp73 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()
Dbionic_systrace.cpp78 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()
Dpthread_setname_np.cpp68 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()
Dsystem_property_set.cpp83 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()
Dlibc_init_common.cpp203 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()
Dnetinet_in.cpp64 int rc = TEMP_FAILURE_RETRY(bind(sd, reinterpret_cast<sockaddr*>(sin), sizeof(*sin))); in bindresvport()
Dsystem.cpp69 pid_t pid = TEMP_FAILURE_RETRY(waitpid(child, &status, 0)); in system()
Ddirent.cpp109 int rc = TEMP_FAILURE_RETRY(__getdents64(d->fd_, d->buff_, sizeof(d->buff_))); in __fill_DIR()
Dpthread_internal.cpp266 if (TEMP_FAILURE_RETRY(sem_wait(&g_sem)) != 0) { in android_run_on_all_threads()
/bionic/libc/tzcode/
Dbionic.cpp134 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/
Dlinker_crt_pad_segment_test.cpp58 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()
Dlinker_main.cpp216 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()
Dlinker_phdr.cpp224 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/
Dasync_safe_log.cpp123 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/
DEINTR.md57 `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/
Dspawn_benchmark.cpp52 const pid_t wait_result = TEMP_FAILURE_RETRY(waitpid(child, &wstatus, 0)); in BM_spawn_test()
/bionic/benchmarks/tests/
Dinterface_test.cpp124 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/
Dstdio.cpp427 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/
Dmalloc_debug_system_tests.cpp292 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/
Dunistd.h378 #define TEMP_FAILURE_RETRY(exp) ({ \ macro

12