Home
last modified time | relevance | path

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

123456

/aosp14/system/core/libcutils/
H A 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()
H A Dashmem-dev.cpp213 int fd = TEMP_FAILURE_RETRY(open(ashmem_device_path.c_str(), O_RDWR | O_CLOEXEC)); in __ashmem_open_locked()
218 fd = TEMP_FAILURE_RETRY(open("/dev/ashmem", O_RDWR | O_CLOEXEC)); in __ashmem_open_locked()
228 int ret = TEMP_FAILURE_RETRY(fstat(fd, &st)); in __ashmem_open_locked()
388 ret = TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_SET_NAME, buf)); in ashmem_create_region()
394 ret = TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_SET_SIZE, size)); in ashmem_create_region()
444 return __ashmem_check_failure(fd, TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_SET_PROT_MASK, prot))); in ashmem_set_prot_region()
460 return __ashmem_check_failure(fd, TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_PIN, &pin))); in ashmem_pin_region()
476 return __ashmem_check_failure(fd, TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_UNPIN, &pin))); in ashmem_unpin_region()
496 return __ashmem_check_failure(fd, TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_GET_SIZE, NULL))); in ashmem_get_size_region()
H A Dklog.cpp42 return TEMP_FAILURE_RETRY(open(kmsg_device, O_WRONLY | O_CLOEXEC)); in __open_klog()
52 TEMP_FAILURE_RETRY(writev(klog_fd, iov, iov_count)); in klog_writev()
/aosp14/frameworks/base/cmds/incidentd/src/
H A DFdBuffer.cpp79 int count = TEMP_FAILURE_RETRY(poll(&pfds, 1, remainingTime)); in read()
92 ssize_t amt = TEMP_FAILURE_RETRY( in read()
129 TEMP_FAILURE_RETRY(::read(fd, mBuffer->writeBuffer(), mBuffer->currentToWrite())); in readFully()
185 int count = TEMP_FAILURE_RETRY(poll(pfds, 3, remainingTime)); in readProcessedDataInStream()
211 amt = TEMP_FAILURE_RETRY(::read(fd, cirBuf + rpos, BUFFER_SIZE - rpos)); in readProcessedDataInStream()
213 amt = TEMP_FAILURE_RETRY(::read(fd, cirBuf + rpos, wpos - rpos)); in readProcessedDataInStream()
233 amt = TEMP_FAILURE_RETRY(::write(toFd.get(), cirBuf + wpos, rpos - wpos)); in readProcessedDataInStream()
235 amt = TEMP_FAILURE_RETRY(::write(toFd.get(), cirBuf + wpos, BUFFER_SIZE - wpos)); in readProcessedDataInStream()
264 ssize_t amt = TEMP_FAILURE_RETRY( in readProcessedDataInStream()
/aosp14/system/core/debuggerd/
H A 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()
H A Dcrash_dump.cpp286 ssize_t rc = TEMP_FAILURE_RETRY(read(fd.get(), &buf, sizeof(buf))); in ReadCrashInfo()
349 pid_t result = TEMP_FAILURE_RETRY(waitpid(pid, &status, __WALL)); in wait_for_clone()
452 TEMP_FAILURE_RETRY(read(fork_exit_read.get(), &buf, sizeof(buf))); in main()
564 if (TEMP_FAILURE_RETRY(write(output_pipe.get(), "\1", 1)) != 1) { in main()
611 if (TEMP_FAILURE_RETRY(dup2(g_output_fd.get(), STDOUT_FILENO)) == -1) { in main()
615 unique_fd devnull(TEMP_FAILURE_RETRY(open("/dev/null", O_RDWR))); in main()
616 TEMP_FAILURE_RETRY(dup2(devnull.get(), STDOUT_FILENO)); in main()
/aosp14/system/core/fastboot/
H A 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()
/aosp14/system/core/trusty/libtrusty/
H A 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()
/aosp14/frameworks/base/core/jni/
H A Dfd_utils.cpp220 if (TEMP_FAILURE_RETRY(fstat(fd, &f_stat)) == -1) { in CreateFromFd()
281 const int fd_flags = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFD)); in CreateFromFd()
301 int fs_flags = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFL)); in CreateFromFd()
310 const off_t offset = TEMP_FAILURE_RETRY(lseek64(fd, 0, SEEK_CUR)); in CreateFromFd()
323 if (TEMP_FAILURE_RETRY(fstat(fd, &f_stat)) == -1) { in RefersToSameFile()
344 const int new_fd = TEMP_FAILURE_RETRY(open(file_path.c_str(), open_flags)); in ReopenOrDetach()
353 if (TEMP_FAILURE_RETRY(fcntl(new_fd, F_SETFD, fd_flags)) == -1) { in ReopenOrDetach()
362 if (TEMP_FAILURE_RETRY(fcntl(new_fd, F_SETFL, fs_flags)) == -1) { in ReopenOrDetach()
371 if (offset != -1 && TEMP_FAILURE_RETRY(lseek64(new_fd, offset, SEEK_SET)) == -1) { in ReopenOrDetach()
380 if (TEMP_FAILURE_RETRY(dup3(new_fd, fd, dup_flags)) == -1) { in ReopenOrDetach()
[all …]
/aosp14/system/core/libstats/push_compat/
H A 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()
/aosp14/frameworks/base/tools/aapt2/io/
H A DFileStream.cpp43 fd_.reset(TEMP_FAILURE_RETRY(::android::base::utf8::open(path.c_str(), mode))); in FileInputStream()
74 ssize_t n = TEMP_FAILURE_RETRY(read(fd_, buffer_.get(), buffer_capacity_)); in Next()
114 owned_fd_.reset(TEMP_FAILURE_RETRY(::android::base::utf8::open(path.c_str(), mode, 0666))); in FileOutputStream()
181 ssize_t n = TEMP_FAILURE_RETRY(write(fd_, buffer_.get(), buffer_offset_)); in FlushImpl()
/aosp14/system/core/debuggerd/handler/
H A Ddebuggerd_handler.cpp308 if (TEMP_FAILURE_RETRY(waitpid(first, &status, __WCLONE)) != first) { in create_vm_process()
349 int devnull = TEMP_FAILURE_RETRY(open("/dev/null", O_RDWR)); in debuggerd_dispatch_pseudothread()
357 TEMP_FAILURE_RETRY(dup2(devnull, 1)); in debuggerd_dispatch_pseudothread()
358 TEMP_FAILURE_RETRY(dup2(devnull, 2)); in debuggerd_dispatch_pseudothread()
419 ssize_t rc = TEMP_FAILURE_RETRY(writev(output_write.get(), iovs, arraysize(iovs))); in debuggerd_dispatch_pseudothread()
432 TEMP_FAILURE_RETRY(dup2(input_write.get(), STDOUT_FILENO)); in debuggerd_dispatch_pseudothread()
433 TEMP_FAILURE_RETRY(dup2(output_read.get(), STDIN_FILENO)); in debuggerd_dispatch_pseudothread()
463 rc = TEMP_FAILURE_RETRY(read(input_read.get(), &buf, sizeof(buf))); in debuggerd_dispatch_pseudothread()
489 if (TEMP_FAILURE_RETRY(waitpid(crash_dump_pid, &status, 0)) == -1) { in debuggerd_dispatch_pseudothread()
501 TEMP_FAILURE_RETRY(read(input_read, &buf, sizeof(buf))); in debuggerd_dispatch_pseudothread()
/aosp14/system/core/libusbhost/
H A 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()
/aosp14/system/core/libsysutils/src/
H A DSocketListener.cpp115 rc = TEMP_FAILURE_RETRY(write(mCtrlPipe[1], &c, 1)); in stopListener()
168 int rc = TEMP_FAILURE_RETRY(poll(fds.data(), fds.size(), -1)); in runListener()
177 TEMP_FAILURE_RETRY(read(mCtrlPipe[0], &c, 1)); in runListener()
184 int c = TEMP_FAILURE_RETRY(accept4(mSock, nullptr, nullptr, SOCK_CLOEXEC)); in runListener()
239 TEMP_FAILURE_RETRY(write(mCtrlPipe[1], &b, 1)); in release()
/aosp14/system/core/libcutils/include/cutils/
H A Dfs.h28 #ifndef TEMP_FAILURE_RETRY
30 #define TEMP_FAILURE_RETRY(exp) ({ \ macro
/aosp14/system/core/libcutils/include_outside_system/cutils/
H A Dfs.h28 #ifndef TEMP_FAILURE_RETRY
30 #define TEMP_FAILURE_RETRY(exp) ({ \ macro
/aosp14/system/core/libappfuse/
H A DFuseBuffer.cc53 const ssize_t result = sockflag ? TEMP_FAILURE_RETRY(recv(fd, buf, sizeof(T), sockflag)) in ReadInternal()
54 : TEMP_FAILURE_RETRY(read(fd, buf, sizeof(T))); in ReadInternal()
100 result = TEMP_FAILURE_RETRY(send(fd, buf, header.len, sockflag)); in WriteInternal()
104 result = TEMP_FAILURE_RETRY(writev(fd, vec, arraysize(vec))); in WriteInternal()
106 result = TEMP_FAILURE_RETRY(write(fd, buf, header.len)); in WriteInternal()
/aosp14/system/core/init/
H A Dproto_utils.h33 auto result = TEMP_FAILURE_RETRY(recv(socket, buffer, sizeof(buffer), 0)); in ReadMessage()
54 TEMP_FAILURE_RETRY(send(socket, message_string.c_str(), message_string.size(), 0)); in SendMessage()
/aosp14/system/core/trusty/storage/proxy/
H A Dstorage.c154 rc = TEMP_FAILURE_RETRY(pwrite(fd, buf, size, offset)); in write_with_retry()
171 rc = TEMP_FAILURE_RETRY(pread(fd, buf, size, offset)); in read_with_retry()
239 parent_fd = TEMP_FAILURE_RETRY(open(parent_path, O_RDONLY)); in sync_parent()
324 rc = TEMP_FAILURE_RETRY(open(path, open_flags, S_IRUSR | S_IWUSR)); in storage_file_open()
327 rc = TEMP_FAILURE_RETRY(open(path, open_flags, S_IRUSR | S_IWUSR)); in storage_file_open()
331 rc = TEMP_FAILURE_RETRY(open(path, open_flags, S_IRUSR | S_IWUSR)); in storage_file_open()
337 rc = TEMP_FAILURE_RETRY(open(path, open_flags, S_IRUSR | S_IWUSR)); in storage_file_open()
546 int rc = TEMP_FAILURE_RETRY(ftruncate(fd, req->size)); in storage_file_set_size()
/aosp14/frameworks/base/libs/androidfw/
H A DObbFile.cpp62 #ifndef TEMP_FAILURE_RETRY
64 #define TEMP_FAILURE_RETRY(exp) ({ \ macro
137 actual = TEMP_FAILURE_RETRY(read(fd, footer, kFooterTagSize)); in parseObbFile()
179 actual = TEMP_FAILURE_RETRY(read(fd, scanBuf, footerSize)); in parseObbFile()
H A DStreamingZipInflater.cpp34 #ifndef TEMP_FAILURE_RETRY
36 #define TEMP_FAILURE_RETRY(exp) ({ \ macro
213 ssize_t didRead = TEMP_FAILURE_RETRY(::read(mFd, mInBuf, toRead)); in readNextChunk()
/aosp14/system/core/debuggerd/tombstoned/
H A Dintercept_manager.cpp126 TEMP_FAILURE_RETRY(write(sockfd, &response, sizeof(response))); in intercept_request_cb()
140 TEMP_FAILURE_RETRY(write(sockfd, &response, sizeof(response))); in intercept_request_cb()
149 if (TEMP_FAILURE_RETRY(write(sockfd, &response, sizeof(response))) == -1) { in intercept_request_cb()
230 TEMP_FAILURE_RETRY(write(intercept->sockfd, &response, sizeof(response))); in GetIntercept()
/aosp14/system/core/fs_mgr/libdm/
H A Dloop_control.cpp36 control_fd_.reset(TEMP_FAILURE_RETRY(open(kLoopControlDevice, O_RDWR | O_CLOEXEC))); in LoopControl()
59 TEMP_FAILURE_RETRY(open(loopdev->c_str(), O_RDWR | O_CLOEXEC))); in Attach()
87 android::base::unique_fd loop_fd(TEMP_FAILURE_RETRY(open(loopdev.c_str(), O_RDWR | O_CLOEXEC))); in Detach()
/aosp14/system/core/libutils/include/utils/
H A DCompat.h75 #ifndef TEMP_FAILURE_RETRY
77 #define TEMP_FAILURE_RETRY(exp) \ macro
/aosp14/system/core/fs_mgr/libsnapshot/snapuserd/dm-snapshot-merge/
H A Dsnapuserd_server.cpp97 ssize_t ret = TEMP_FAILURE_RETRY(send(fd.get(), msg.data(), msg.size(), MSG_NOSIGNAL)); in Sendmsg()
112 ssize_t rv = TEMP_FAILURE_RETRY(recv(fd.get(), msg, sizeof(msg), 0)); in Recv()
312 int rv = TEMP_FAILURE_RETRY(poll(watched_fds_.data(), watched_fds_.size(), -1)); in Run()
363 int fd = TEMP_FAILURE_RETRY(accept4(sockfd_.get(), nullptr, nullptr, SOCK_CLOEXEC)); in AcceptClient()
508 if (TEMP_FAILURE_RETRY(send(fd, code, sizeof(code), MSG_NOSIGNAL)) < 0) { in WaitForSocket()
539 TEMP_FAILURE_RETRY(accept4(proxy_fd.get(), nullptr, nullptr, SOCK_CLOEXEC))); in RunForSocketHandoff()

123456