Home
last modified time | relevance | path

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

123456789

/system/vold/
DBenchmarkGen.h44 int t3433f17 = TEMP_FAILURE_RETRY(open("file0", O_RDONLY|O_LARGEFILE)); in BenchmarkRun()
45 TEMP_FAILURE_RETRY(lseek(t3433f17, 0, SEEK_END)); in BenchmarkRun()
46 TEMP_FAILURE_RETRY(lseek(t3433f17, 38891199, SEEK_SET)); in BenchmarkRun()
47 TEMP_FAILURE_RETRY(read(t3433f17, buf, 65557)); in BenchmarkRun()
48 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 769726, 38187008)); // mmap2 in BenchmarkRun()
49 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 30, 278721)); in BenchmarkRun()
50 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 19, 278751)); in BenchmarkRun()
51 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 25119, 278528)); // mmap2 in BenchmarkRun()
52 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 30, 37276895)); in BenchmarkRun()
53 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 14, 37276925)); in BenchmarkRun()
[all …]
/system/core/liblog/tests/
Dlogd_writer_test.cpp42 server_socket.reset(TEMP_FAILURE_RETRY(socket(AF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0))); in TEST()
49 TEMP_FAILURE_RETRY(bind(server_socket, reinterpret_cast<sockaddr*>(&server_sockaddr), in TEST()
58 unique_fd{TEMP_FAILURE_RETRY(socket(AF_UNIX, SOCK_DGRAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0))}; in TEST()
64 TEMP_FAILURE_RETRY(connect(client_socket, reinterpret_cast<sockaddr*>(&client_sockaddr), in TEST()
70 ASSERT_EQ(smoke_len, TEMP_FAILURE_RETRY(write(client_socket, kSmoke, sizeof(kSmoke)))); in TEST()
72 ASSERT_EQ(smoke_len, TEMP_FAILURE_RETRY(read(server_socket, read_buf, sizeof(read_buf)))); in TEST()
80 ASSERT_EQ(-1, TEMP_FAILURE_RETRY(write(client_socket, kSmoke, sizeof(kSmoke)))); in TEST()
88 TEMP_FAILURE_RETRY(connect(client_socket, reinterpret_cast<sockaddr*>(&client_sockaddr), in TEST()
93 ASSERT_EQ(smoke_len, TEMP_FAILURE_RETRY(write(client_socket, kSmoke, sizeof(kSmoke)))); in TEST()
94 ASSERT_EQ(smoke_len, TEMP_FAILURE_RETRY(read(server_socket, read_buf, sizeof(read_buf)))); in TEST()
/system/core/libunwindstack/tests/
DGenGnuDebugdata.cpp54 TEMP_FAILURE_RETRY(write(fd, ehdr, sizeof(Ehdr))); in GenElf()
60 TEMP_FAILURE_RETRY(write(fd, &shdr, sizeof(Shdr))); in GenElf()
70 TEMP_FAILURE_RETRY(write(fd, &shdr, sizeof(Shdr))); in GenElf()
78 TEMP_FAILURE_RETRY(write(fd, &shdr, sizeof(Shdr))); in GenElf()
83 TEMP_FAILURE_RETRY(write(fd, name.data(), name.size() + 1)); in GenElf()
85 TEMP_FAILURE_RETRY(write(fd, name.data(), name.size() + 1)); in GenElf()
87 TEMP_FAILURE_RETRY(write(fd, name.data(), name.size() + 1)); in GenElf()
91 int elf32_fd = TEMP_FAILURE_RETRY(open("elf32", O_RDWR | O_CREAT | O_TRUNC | O_CLOEXEC, 0644)); in main()
97 int elf64_fd = TEMP_FAILURE_RETRY(open("elf64", O_RDWR | O_CREAT | O_TRUNC | O_CLOEXEC, 0644)); in main()
DDexFileTest.cpp44 ASSERT_EQ(size_t{10}, static_cast<size_t>(TEMP_FAILURE_RETRY(write(tf.fd, kDexData, 10)))); in TEST()
52 static_cast<size_t>(TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(kDexData) - 1)))); in TEST()
61 static_cast<size_t>(TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(kDexData))))); in TEST()
72 static_cast<size_t>(TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(kDexData))))); in TEST()
98 static_cast<size_t>(TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(kDexData))))); in TEST()
151 static_cast<size_t>(TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(kDexData))))); in TEST()
164 static_cast<size_t>(TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(kDexData))))); in TEST()
177 static_cast<size_t>(TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(kDexData))))); in TEST()
203 static_cast<size_t>(TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(kDexData) - 10)))); in TEST()
/system/memory/lmkd/
Dliblmkd_utils.cpp40 ret = TEMP_FAILURE_RETRY(write(sock, packet, size)); in lmkd_register_proc()
51 ret = TEMP_FAILURE_RETRY(write(sock, packet, size)); in lmkd_unregister_proc()
61 if (TEMP_FAILURE_RETRY(write(sock, packet, size)) < 0) { in lmkd_update_props()
65 size = TEMP_FAILURE_RETRY(read(sock, packet, CTRL_PACKET_MAX_SIZE)); in lmkd_update_props()
106 written = TEMP_FAILURE_RETRY(write(tasks_file, buf, written)); in create_memcg()
/system/libartpalette/
Dpalette_android.cc124 TEMP_FAILURE_RETRY(ftruncate(output_fd, 0)); in PaletteWriteCrashThreadStacks()
128 if (TEMP_FAILURE_RETRY(fdatasync(output_fd)) == -1 && errno != EINVAL) { in PaletteWriteCrashThreadStacks()
135 TEMP_FAILURE_RETRY(ftruncate(output_fd, 0)); in PaletteWriteCrashThreadStacks()
136 TEMP_FAILURE_RETRY(fdatasync(output_fd)); in PaletteWriteCrashThreadStacks()
192 *fd = TEMP_FAILURE_RETRY(open("/dev/ashmem", O_RDWR | O_CLOEXEC)); in PaletteAshmemCreateRegion()
197 if (TEMP_FAILURE_RETRY(ioctl(*fd, ASHMEM_SET_SIZE, size)) < 0) { in PaletteAshmemCreateRegion()
204 if (TEMP_FAILURE_RETRY(ioctl(*fd, ASHMEM_SET_NAME, buf)) < 0) { in PaletteAshmemCreateRegion()
225 } else if (TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_SET_PROT_MASK, prot)) < 0) { in PaletteAshmemSetProtRegion()
/system/core/libcutils/
Dfs.cpp52 if (TEMP_FAILURE_RETRY(lstat(path, &sb)) == -1) { in fs_prepare_path_impl()
88 ? TEMP_FAILURE_RETRY(mkdir(path, mode)) in fs_prepare_path_impl()
89 : TEMP_FAILURE_RETRY(open(path, O_CREAT | O_CLOEXEC | O_NOFOLLOW | O_RDONLY, 0644)); in fs_prepare_path_impl()
103 if (TEMP_FAILURE_RETRY(chmod(path, mode)) == -1) { in fs_prepare_path_impl()
107 if (TEMP_FAILURE_RETRY(chown(path, uid, gid)) == -1) { in fs_prepare_path_impl()
128 int fd = TEMP_FAILURE_RETRY(open(path, O_RDONLY)); in fs_read_atomic_int()
135 if (TEMP_FAILURE_RETRY(read(fd, buf, BUF_SIZE)) == -1) { in fs_read_atomic_int()
159 int fd = TEMP_FAILURE_RETRY(mkstemp(temp)); in fs_write_atomic_int()
171 if (TEMP_FAILURE_RETRY(write(fd, buf, len)) < len) { in fs_write_atomic_int()
Dashmem-dev.cpp211 int fd = TEMP_FAILURE_RETRY(open(ashmem_device_path.c_str(), O_RDWR | O_CLOEXEC)); in __ashmem_open_locked()
215 fd = TEMP_FAILURE_RETRY(open("/dev/ashmem", O_RDWR | O_CLOEXEC)); in __ashmem_open_locked()
223 int ret = TEMP_FAILURE_RETRY(fstat(fd, &st)); in __ashmem_open_locked()
375 ret = TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_SET_NAME, buf)); in ashmem_create_region()
381 ret = TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_SET_SIZE, size)); in ashmem_create_region()
416 return __ashmem_check_failure(fd, TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_SET_PROT_MASK, prot))); in ashmem_set_prot_region()
432 return __ashmem_check_failure(fd, TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_PIN, &pin))); in ashmem_pin_region()
448 return __ashmem_check_failure(fd, TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_UNPIN, &pin))); in ashmem_unpin_region()
468 return __ashmem_check_failure(fd, TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_GET_SIZE, NULL))); in ashmem_get_size_region()
/system/nvram/hal/
Dfake_nvram_storage.cpp66 if (TEMP_FAILURE_RETRY(unlinkat(g_data_dir_fd, name, 0))) { in DeleteFile()
80 TEMP_FAILURE_RETRY(openat(g_data_dir_fd, name, O_RDONLY))); in LoadFile()
90 if (TEMP_FAILURE_RETRY(fstat(data_file_fd.get(), &data_file_stat))) { in LoadFile()
116 android::base::unique_fd data_file_fd(TEMP_FAILURE_RETRY( in StoreFile()
135 if (TEMP_FAILURE_RETRY(fdatasync(data_file_fd.get()))) { in StoreFile()
144 if (TEMP_FAILURE_RETRY( in StoreFile()
152 if (TEMP_FAILURE_RETRY(fsync(g_data_dir_fd))) { in StoreFile()
/system/core/liblog/
Dlogd_writer.cpp49 TEMP_FAILURE_RETRY(connect(logd_socket, reinterpret_cast<sockaddr*>(&un), sizeof(sockaddr_un))); in LogdConnect()
63 TEMP_FAILURE_RETRY(socket(PF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0)); in GetSocket()
132 ret = TEMP_FAILURE_RETRY(writev(logd_socket, newVec, 2)); in LogdWrite()
150 ret = TEMP_FAILURE_RETRY(writev(logd_socket, newVec, 2)); in LogdWrite()
174 ret = TEMP_FAILURE_RETRY(writev(logd_socket, newVec, i)); in LogdWrite()
178 ret = TEMP_FAILURE_RETRY(writev(logd_socket, newVec, i)); in LogdWrite()
/system/extras/memory_replay/tests/
DNativeInfoTest.cpp58 ASSERT_TRUE(TEMP_FAILURE_RETRY( in TEST_F()
119 ASSERT_TRUE(TEMP_FAILURE_RETRY( in TEST_F()
180 ASSERT_TRUE(TEMP_FAILURE_RETRY( in TEST_F()
322 ASSERT_TRUE(TEMP_FAILURE_RETRY( in TEST_F()
/system/hardware/interfaces/suspend/1.0/default/
Dmain.cpp51 unique_fd wakeupCountFd{TEMP_FAILURE_RETRY(open(kSysPowerWakeupCount, O_CLOEXEC | O_RDWR))}; in main()
55 unique_fd stateFd{TEMP_FAILURE_RETRY(open(kSysPowerState, O_CLOEXEC | O_RDWR))}; in main()
60 TEMP_FAILURE_RETRY(open(kSysClassWakeup, O_DIRECTORY | O_CLOEXEC | O_RDONLY))}; in main()
65 TEMP_FAILURE_RETRY(open(kSysPowerSuspendStats, O_DIRECTORY | O_CLOEXEC | O_RDONLY))}; in main()
/system/core/fastboot/
Dsocket.cpp101 int result = TEMP_FAILURE_RETRY(select(sock_ + 1, &read_set, nullptr, nullptr, &timeout)); in WaitForRecv()
138 return TEMP_FAILURE_RETRY(sendto(sock_, reinterpret_cast<const char*>(data), length, 0, in Send()
149 return TEMP_FAILURE_RETRY(socket_send_buffers_function_( in Send()
165 return TEMP_FAILURE_RETRY(recvfrom(sock_, reinterpret_cast<char*>(data), length, 0, in Receive()
187 TEMP_FAILURE_RETRY(send(sock_, reinterpret_cast<const char*>(data), length, 0)); in Send()
200 ssize_t sent = TEMP_FAILURE_RETRY( in Send()
237 return TEMP_FAILURE_RETRY(recv(sock_, reinterpret_cast<char*>(data), length, 0)); in Receive()
/system/netd/client/
DFwmarkClient.cpp79 if (TEMP_FAILURE_RETRY(connect(mChannel, reinterpret_cast<const sockaddr*>(&FWMARK_SERVER_PATH), in send()
114 if (TEMP_FAILURE_RETRY(sendmsg(mChannel, &message, 0)) == -1) { in send()
120 if (TEMP_FAILURE_RETRY(recv(mChannel, &error, sizeof(error), 0)) == -1) { in send()
/system/security/keystore/
Dkeystore_utils.cpp42 ssize_t n = TEMP_FAILURE_RETRY(read(fd, data, remaining)); in readFully()
55 ssize_t n = TEMP_FAILURE_RETRY(write(fd, data, remaining)); in writeFully()
63 if (TEMP_FAILURE_RETRY(fsync(fd)) == -1) { in writeFully()
94 android::base::unique_fd dir_fd(TEMP_FAILURE_RETRY(open(path.c_str(), O_DIRECTORY | O_RDONLY))); in fsyncDirectory()
101 if (TEMP_FAILURE_RETRY(fsync(dir_fd)) == -1) { in fsyncDirectory()
/system/core/logd/
Dmain.cpp189 int sock = TEMP_FAILURE_RETRY(socket_local_client( in issueReinit()
194 ssize_t ret = TEMP_FAILURE_RETRY(write(sock, reinitStr, sizeof(reinitStr))); in issueReinit()
201 ret = TEMP_FAILURE_RETRY(poll(&p, 1, 1000)); in issueReinit()
208 ret = TEMP_FAILURE_RETRY(read(sock, buffer, sizeof(buffer))); in issueReinit()
246 fdDmesg = TEMP_FAILURE_RETRY(open(dev_kmsg, O_WRONLY | O_CLOEXEC)); in main()
256 fdPmesg = TEMP_FAILURE_RETRY( in main()
340 TEMP_FAILURE_RETRY(pause()); in main()
/system/core/libcutils/include_vndk/cutils/
Dfs.h28 #ifndef TEMP_FAILURE_RETRY
30 #define TEMP_FAILURE_RETRY(exp) ({ \ macro
/system/core/libcutils/include/cutils/
Dfs.h28 #ifndef TEMP_FAILURE_RETRY
30 #define TEMP_FAILURE_RETRY(exp) ({ \ macro
/system/core/init/
Dsecurity.cpp53 TEMP_FAILURE_RETRY(open("/dev/hw_random", O_RDONLY | O_NOFOLLOW | O_CLOEXEC))); in MixHwrngIntoLinuxRngAction()
64 TEMP_FAILURE_RETRY(open("/dev/urandom", O_WRONLY | O_NOFOLLOW | O_CLOEXEC))); in MixHwrngIntoLinuxRngAction()
73 TEMP_FAILURE_RETRY(read(hwrandom_fd, buf, sizeof(buf) - total_bytes_written)); in MixHwrngIntoLinuxRngAction()
80 chunk_size = TEMP_FAILURE_RETRY(write(urandom_fd, buf, chunk_size)); in MixHwrngIntoLinuxRngAction()
/system/memory/libmemunreachable/
DLeakPipe.h102 ssize_t ret = TEMP_FAILURE_RETRY(write(fd_, &value, sizeof(T))); in Send()
121 ssize_t ret = TEMP_FAILURE_RETRY(write(fd_, vector.data(), size)); in SendVector()
140 ssize_t ret = TEMP_FAILURE_RETRY(read(fd_, reinterpret_cast<void*>(value), sizeof(T))); in Receive()
163 ssize_t ret = TEMP_FAILURE_RETRY(read(fd_, ptr, size)); in ReceiveVector()
/system/core/adb/
Dsysdeps.h127 return TEMP_FAILURE_RETRY(unix_read_interruptible(fd, buf, len)); in unix_read()
422 return TEMP_FAILURE_RETRY(open(zero_terminated.c_str(), options)); in unix_open()
429 return TEMP_FAILURE_RETRY(open(zero_terminated.c_str(), options, mode)); in unix_open()
436 return TEMP_FAILURE_RETRY(open(pathname, options, mode)); in adb_open_mode()
447 int fd = TEMP_FAILURE_RETRY(open(pathname, options)); in adb_open()
487 return TEMP_FAILURE_RETRY(read(fd.get(), buf, len)); in adb_read()
492 return TEMP_FAILURE_RETRY(pread(fd.get(), buf, len, offset)); in adb_pread()
494 return TEMP_FAILURE_RETRY(pread64(fd.get(), buf, len, offset)); in adb_pread()
509 return TEMP_FAILURE_RETRY(write(fd.get(), buf, len)); in adb_write()
514 return TEMP_FAILURE_RETRY(pwrite(fd, buf, len, offset)); in adb_pwrite()
[all …]
/system/core/debuggerd/handler/
Ddebuggerd_handler.cpp287 if (TEMP_FAILURE_RETRY(waitpid(first, &status, __WCLONE)) != first) { in create_vm_process()
328 int devnull = TEMP_FAILURE_RETRY(open("/dev/null", O_RDWR)); in debuggerd_dispatch_pseudothread()
336 TEMP_FAILURE_RETRY(dup2(devnull, 1)); in debuggerd_dispatch_pseudothread()
337 TEMP_FAILURE_RETRY(dup2(devnull, 2)); in debuggerd_dispatch_pseudothread()
375 ssize_t rc = TEMP_FAILURE_RETRY(writev(output_write.get(), iovs, arraysize(iovs))); in debuggerd_dispatch_pseudothread()
388 TEMP_FAILURE_RETRY(dup2(input_write.get(), STDOUT_FILENO)); in debuggerd_dispatch_pseudothread()
389 TEMP_FAILURE_RETRY(dup2(output_read.get(), STDIN_FILENO)); in debuggerd_dispatch_pseudothread()
419 rc = TEMP_FAILURE_RETRY(read(input_read.get(), &buf, sizeof(buf))); in debuggerd_dispatch_pseudothread()
445 if (TEMP_FAILURE_RETRY(waitpid(crash_dump_pid, &status, 0)) == -1) { in debuggerd_dispatch_pseudothread()
457 TEMP_FAILURE_RETRY(read(input_read, &buf, sizeof(buf))); in debuggerd_dispatch_pseudothread()
/system/core/libstats/socket/
Dstatsd_writer.c89 int sock = TEMP_FAILURE_RETRY(socket(PF_UNIX, flags, 0)); in statsdOpen()
103 if (TEMP_FAILURE_RETRY( in statsdOpen()
217 ret = TEMP_FAILURE_RETRY(writev(sock, newVec, 2)); in statsdWrite()
250 ret = TEMP_FAILURE_RETRY(writev(sock, newVec, i)); in statsdWrite()
271 ret = TEMP_FAILURE_RETRY(writev(atomic_load(&statsdLoggerWrite.sock), newVec, i)); in statsdWrite()
/system/extras/simpleperf/
Dworkload.cpp128 ssize_t nread = TEMP_FAILURE_RETRY(read(start_signal_fd, &start_signal, 1)); in ChildProcessFn()
145 TEMP_FAILURE_RETRY(write(exec_child_fd, &exec_child_failed, 1)); in ChildProcessFn()
158 ssize_t nwrite = TEMP_FAILURE_RETRY(write(start_signal_fd_, &start_signal, 1)); in Start()
164 ssize_t nread = TEMP_FAILURE_RETRY(read(exec_child_fd_, &exec_child_failed, 1)); in Start()
187 pid_t result = TEMP_FAILURE_RETRY(waitpid(work_pid_, &status, (wait_forever ? 0 : WNOHANG))); in WaitChildProcess()
/system/core/libstats/push_compat/
Dstatsd_writer.c89 int sock = TEMP_FAILURE_RETRY(socket(PF_UNIX, flags, 0)); in statsdOpen()
103 if (TEMP_FAILURE_RETRY( in statsdOpen()
217 ret = TEMP_FAILURE_RETRY(writev(sock, newVec, 2)); in statsdWrite()
250 ret = TEMP_FAILURE_RETRY(writev(sock, newVec, i)); in statsdWrite()
271 ret = TEMP_FAILURE_RETRY(writev(atomic_load(&statsdLoggerWrite.sock), newVec, i)); in statsdWrite()

123456789