Home
last modified time | relevance | path

Searched refs:TEMP_FAILURE_RETRY (Results 1 – 25 of 220) 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/logging/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/memory/lmkd/
Dliblmkd_utils.cpp41 ret = TEMP_FAILURE_RETRY(write(sock, packet, size)); in lmkd_register_proc()
52 ret = TEMP_FAILURE_RETRY(write(sock, packet, size)); in lmkd_register_procs()
63 ret = TEMP_FAILURE_RETRY(write(sock, packet, size)); in lmkd_unregister_proc()
73 if (TEMP_FAILURE_RETRY(write(sock, packet, size)) < 0) { in lmkd_update_props()
77 size = TEMP_FAILURE_RETRY(read(sock, packet, CTRL_PACKET_MAX_SIZE)); in lmkd_update_props()
97 if (TEMP_FAILURE_RETRY(write(sock, packet, size)) < 0) { in lmkd_notify_boot_completed()
101 size = TEMP_FAILURE_RETRY(read(sock, packet, CTRL_PACKET_MAX_SIZE)); in lmkd_notify_boot_completed()
137 if (TEMP_FAILURE_RETRY(write(sock, packet, size)) < 0) { in lmkd_get_kill_count()
141 size = TEMP_FAILURE_RETRY(read(sock, packet, CTRL_PACKET_MAX_SIZE)); in lmkd_get_kill_count()
/system/unwinding/libunwindstack/tests/
DGenGnuDebugdata.cpp50 TEMP_FAILURE_RETRY(write(fd, ehdr, sizeof(Ehdr))); in GenElf()
56 TEMP_FAILURE_RETRY(write(fd, &shdr, sizeof(Shdr))); in GenElf()
66 TEMP_FAILURE_RETRY(write(fd, &shdr, sizeof(Shdr))); in GenElf()
74 TEMP_FAILURE_RETRY(write(fd, &shdr, sizeof(Shdr))); in GenElf()
79 TEMP_FAILURE_RETRY(write(fd, name.data(), name.size() + 1)); in GenElf()
81 TEMP_FAILURE_RETRY(write(fd, name.data(), name.size() + 1)); in GenElf()
83 TEMP_FAILURE_RETRY(write(fd, name.data(), name.size() + 1)); in GenElf()
87 int elf32_fd = TEMP_FAILURE_RETRY(open("elf32", O_RDWR | O_CREAT | O_TRUNC | O_CLOEXEC, 0644)); in main()
93 int elf64_fd = TEMP_FAILURE_RETRY(open("elf64", O_RDWR | O_CREAT | O_TRUNC | O_CLOEXEC, 0644)); in main()
DDexFileTest.cpp62 static_cast<size_t>(TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(kDexData))))); in TEST()
97 static_cast<size_t>(TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(kDexData))))); in TEST()
110 static_cast<size_t>(TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(kDexData))))); in TEST()
123 static_cast<size_t>(TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(kDexData))))); in TEST()
149 static_cast<size_t>(TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(kDexData) - 10)))); in TEST()
215 static_cast<size_t>(TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(kDexData))))); in TEST()
232 ASSERT_EQ(4u, static_cast<size_t>(TEMP_FAILURE_RETRY(write(tf.fd, "MAIN", 4)))); in TEST()
/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.cpp165 int fd = TEMP_FAILURE_RETRY(open(ashmem_device_path.c_str(), O_RDWR | O_CLOEXEC)); in __ashmem_open_locked()
170 fd = TEMP_FAILURE_RETRY(open("/dev/ashmem", O_RDWR | O_CLOEXEC)); in __ashmem_open_locked()
180 int ret = TEMP_FAILURE_RETRY(fstat(fd, &st)); in __ashmem_open_locked()
340 ret = TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_SET_NAME, buf)); in ashmem_create_region()
346 ret = TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_SET_SIZE, size)); in ashmem_create_region()
396 return __ashmem_check_failure(fd, TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_SET_PROT_MASK, prot))); in ashmem_set_prot_region()
412 return __ashmem_check_failure(fd, TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_PIN, &pin))); in ashmem_pin_region()
428 return __ashmem_check_failure(fd, TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_UNPIN, &pin))); in ashmem_unpin_region()
448 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()
Dfake_nvram.cpp118 TEMP_FAILURE_RETRY(read(socket, command_buffer, sizeof(command_buffer))); in ProcessCommand()
142 if (TEMP_FAILURE_RETRY(write(socket, command_buffer, response_size)) < 0) { in ProcessCommand()
159 while (TEMP_FAILURE_RETRY(poll(poll_fds, poll_fds_count, -1)) >= 0) { in ProcessMessages()
230 TEMP_FAILURE_RETRY(open(g_data_directory_path, O_RDONLY | O_DIRECTORY)); in main()
/system/libartpalette/
Dpalette_android.cc117 TEMP_FAILURE_RETRY(ftruncate(output_fd, 0)); in PaletteWriteCrashThreadStacks()
121 if (TEMP_FAILURE_RETRY(fdatasync(output_fd)) == -1 && errno != EINVAL) { in PaletteWriteCrashThreadStacks()
128 TEMP_FAILURE_RETRY(ftruncate(output_fd, 0)); in PaletteWriteCrashThreadStacks()
129 TEMP_FAILURE_RETRY(fdatasync(output_fd)); in PaletteWriteCrashThreadStacks()
185 *fd = TEMP_FAILURE_RETRY(open("/dev/ashmem", O_RDWR | O_CLOEXEC)); in PaletteAshmemCreateRegion()
190 if (TEMP_FAILURE_RETRY(ioctl(*fd, ASHMEM_SET_SIZE, size)) < 0) { in PaletteAshmemCreateRegion()
197 if (TEMP_FAILURE_RETRY(ioctl(*fd, ASHMEM_SET_NAME, buf)) < 0) { in PaletteAshmemCreateRegion()
218 } else if (TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_SET_PROT_MASK, prot)) < 0) { in PaletteAshmemSetProtRegion()
/system/core/debuggerd/
Dtombstone_handler.cpp62 int fd1 = TEMP_FAILURE_RETRY(socket(AF_VSOCK, SOCK_STREAM, 0)); in connect_tombstone_server_microdroid()
63 int fd2 = TEMP_FAILURE_RETRY(socket(AF_VSOCK, SOCK_STREAM, 0)); in connect_tombstone_server_microdroid()
77 if (TEMP_FAILURE_RETRY(connect(vsock_output_fd, (struct sockaddr*)&sa, sizeof(sa))) < 0) { in connect_tombstone_server_microdroid()
83 if (TEMP_FAILURE_RETRY(connect(vsock_proto_fd, (struct sockaddr*)&sa, sizeof(sa))) < 0) { in connect_tombstone_server_microdroid()
/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/logging/logd/
Dmain.cpp155 int sock = TEMP_FAILURE_RETRY(socket_local_client( in issueReinit()
160 ssize_t ret = TEMP_FAILURE_RETRY(write(sock, reinitStr, sizeof(reinitStr))); in issueReinit()
164 ret = TEMP_FAILURE_RETRY(poll(&p, 1, 1000)); in issueReinit()
170 ret = TEMP_FAILURE_RETRY(read(sock, buffer, sizeof(buffer))); in issueReinit()
210 fdDmesg = TEMP_FAILURE_RETRY(open(dev_kmsg, O_WRONLY | O_CLOEXEC)); in main()
222 fdPmesg = TEMP_FAILURE_RETRY( in main()
307 TEMP_FAILURE_RETRY(pause()); in main()
Dlogd_test.cpp53 ssize_t bytes_written = TEMP_FAILURE_RETRY(write(sock, command, command_length)); in write_command()
78 int ret = TEMP_FAILURE_RETRY(poll(&p, 1, 20000)); in send_to_control()
86 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(sock, buffer, sizeof(buffer))); in send_to_control()
251 content_wrap = TEMP_FAILURE_RETRY(recv(fd, msg_wrap.buf, sizeof(msg_wrap), 0)) > 0; in timeout_negative()
256 content_timeout = TEMP_FAILURE_RETRY(recv(fd, msg_timeout.buf, sizeof(msg_timeout), 0)) > 0; in timeout_negative()
259 TEMP_FAILURE_RETRY(recv(fd, msg_timeout.buf, sizeof(msg_timeout), 0)) > 0; in timeout_negative()
318 ASSERT_EQ(0, TEMP_FAILURE_RETRY(waitid(P_PID, pid, &info, WEXITED))); in TEST()
356 content_wrap = TEMP_FAILURE_RETRY(recv(fd, msg_wrap.buf, sizeof(msg_wrap), 0)) > 0; in TEST()
361 content_timeout = TEMP_FAILURE_RETRY(recv(fd, msg_timeout.buf, sizeof(msg_timeout), 0)) > 0; in TEST()
364 TEMP_FAILURE_RETRY(recv(fd, msg_timeout.buf, sizeof(msg_timeout), 0)) > 0; in TEST()
[all …]
/system/core/trusty/libtrusty/
Dtrusty.c36 fd = TEMP_FAILURE_RETRY(open(dev_name, O_RDWR)); in tipc_connect()
43 rc = TEMP_FAILURE_RETRY(ioctl(fd, TIPC_IOC_CONNECT, srv_name)); in tipc_connect()
63 int rc = TEMP_FAILURE_RETRY(ioctl(fd, TIPC_IOC_SEND_MSG, &req)); in tipc_send()
/system/hardware/interfaces/suspend/1.0/default/
Dmain.cpp73 unique_fd wakeupCountFd{TEMP_FAILURE_RETRY(open(kSysPowerWakeupCount, O_CLOEXEC | O_RDWR))}; in main()
77 unique_fd stateFd{TEMP_FAILURE_RETRY(open(kSysPowerState, O_CLOEXEC | O_RDWR))}; in main()
82 TEMP_FAILURE_RETRY(open(kSysClassWakeup, O_DIRECTORY | O_CLOEXEC | O_RDONLY))}; in main()
87 TEMP_FAILURE_RETRY(open(kSysPowerSuspendStats, O_DIRECTORY | O_CLOEXEC | O_RDONLY))}; in main()
92 TEMP_FAILURE_RETRY(open(kSysKernelWakeupReasons, O_CLOEXEC | O_RDONLY))}; in main()
96 unique_fd suspendTimeFd{TEMP_FAILURE_RETRY(open(kSysKernelSuspendTime, O_CLOEXEC | O_RDONLY))}; in main()
/system/logging/liblog/
Dlogd_writer.cpp78 TEMP_FAILURE_RETRY(connect(sock, reinterpret_cast<sockaddr*>(&un), sizeof(sockaddr_un))); in LogdConnect()
95 int new_socket = TEMP_FAILURE_RETRY(socket(PF_UNIX, flags, 0)); in GetSocket()
164 ret = TEMP_FAILURE_RETRY(writev(logd_socket.sock(), newVec, 2)); in LogdWrite()
187 ret = TEMP_FAILURE_RETRY(writev(logd_socket.sock(), newVec, i)); in LogdWrite()
191 ret = TEMP_FAILURE_RETRY(writev(logd_socket.sock(), newVec, i)); in LogdWrite()
/system/core/fastboot/
Dsocket.cpp105 int result = TEMP_FAILURE_RETRY(select(sock_ + 1, &read_set, nullptr, nullptr, &timeout)); in WaitForRecv()
142 return TEMP_FAILURE_RETRY(sendto(sock_, reinterpret_cast<const char*>(data), length, 0, in Send()
153 return TEMP_FAILURE_RETRY(socket_send_buffers_function_( in Send()
169 return TEMP_FAILURE_RETRY(recvfrom(sock_, reinterpret_cast<char*>(data), length, 0, in Receive()
191 TEMP_FAILURE_RETRY(send(sock_, reinterpret_cast<const char*>(data), length, 0)); in Send()
204 ssize_t sent = TEMP_FAILURE_RETRY( in Send()
241 return TEMP_FAILURE_RETRY(recv(sock_, reinterpret_cast<char*>(data), length, 0)); in Receive()
/system/netd/client/
DFwmarkClient.cpp77 if (TEMP_FAILURE_RETRY(connect(mChannel, reinterpret_cast<const sockaddr*>(&FWMARK_SERVER_PATH), in send()
112 if (TEMP_FAILURE_RETRY(sendmsg(mChannel, &message, 0)) == -1) { in send()
118 if (TEMP_FAILURE_RETRY(recv(mChannel, &error, sizeof(error), 0)) == -1) { in send()
/system/core/libusbhost/
Dusbhost_jni.cpp26 if (TEMP_FAILURE_RETRY(lseek(fd, 0, SEEK_SET)) == -1) { in usb_jni_read_descriptors()
32 ssize_t n = TEMP_FAILURE_RETRY(read(fd, buf, sizeof(buf))); in usb_jni_read_descriptors()
/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/libstats/push_compat/
Dstatsd_writer.cpp89 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/core/libcutils/include/cutils/
Dfs.h28 #ifndef TEMP_FAILURE_RETRY
30 #define TEMP_FAILURE_RETRY(exp) ({ \ macro
/system/core/libcutils/include_outside_system/cutils/
Dfs.h28 #ifndef TEMP_FAILURE_RETRY
30 #define TEMP_FAILURE_RETRY(exp) ({ \ macro
/system/extras/simpleperf/
Dworkload.cpp137 ssize_t nread = TEMP_FAILURE_RETRY(read(start_signal_fd, &start_signal, 1)); in ChildProcessFn()
154 TEMP_FAILURE_RETRY(write(exec_child_fd, &exec_child_failed, 1)); in ChildProcessFn()
179 ssize_t nwrite = TEMP_FAILURE_RETRY(write(start_signal_fd_, &start_signal, 1)); in Start()
185 ssize_t nread = TEMP_FAILURE_RETRY(read(exec_child_fd_, &exec_child_failed, 1)); in Start()
208 pid_t result = TEMP_FAILURE_RETRY(waitpid(work_pid_, &status, (wait_forever ? 0 : WNOHANG))); in WaitChildProcess()

123456789