Searched refs:TEMP_FAILURE_RETRY (Results 1 - 25 of 61) sorted by relevance

123

/system/vold/
H A DBenchmarkGen.h42 int t3433f17 = TEMP_FAILURE_RETRY(open("file0", O_RDONLY|O_LARGEFILE));
43 TEMP_FAILURE_RETRY(lseek(t3433f17, 0, SEEK_END));
44 TEMP_FAILURE_RETRY(lseek(t3433f17, 38891199, SEEK_SET));
45 TEMP_FAILURE_RETRY(read(t3433f17, buf, 65557));
46 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 769726, 38187008)); // mmap2
47 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 30, 278721));
48 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 19, 278751));
49 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 25119, 278528)); // mmap2
50 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 30, 37276895));
51 TEMP_FAILURE_RETRY(prea
[all...]
/system/core/include/cutils/
H A Dfs.h24 * TEMP_FAILURE_RETRY is defined by some, but not all, versions of
28 #ifndef TEMP_FAILURE_RETRY
30 #define TEMP_FAILURE_RETRY(exp) ({ \ macro
/system/core/libcutils/
H A Dqtaguid.c50 resTrackFd = TEMP_FAILURE_RETRY(open("/dev/xt_qtaguid", O_RDONLY));
52 TEMP_FAILURE_RETRY(fcntl(resTrackFd, F_SETFD, FD_CLOEXEC));
66 fd = TEMP_FAILURE_RETRY(open(CTRL_PROCPATH, O_WRONLY));
71 res = TEMP_FAILURE_RETRY(write(fd, cmd, strlen(cmd)));
88 param_fd = TEMP_FAILURE_RETRY(open(param_path, O_WRONLY));
92 res = TEMP_FAILURE_RETRY(write(param_fd, value, strlen(value)));
H A Ddebugger.c34 if (TEMP_FAILURE_RETRY(write(sock_fd, msg_ptr, msg_len)) != (ssize_t) msg_len) {
38 if (TEMP_FAILURE_RETRY(read(sock_fd, &ack, 1)) != 1) {
92 while ((n = TEMP_FAILURE_RETRY(read(sock_fd, buffer, sizeof(buffer)))) > 0) {
93 if (TEMP_FAILURE_RETRY(write(fd, buffer, n)) != n) {
115 ssize_t n = TEMP_FAILURE_RETRY(read(sock_fd, buffer, sizeof(buffer) - 1));
H A Dfs.c43 if (TEMP_FAILURE_RETRY(lstat(path, &sb)) == -1) {
64 if (TEMP_FAILURE_RETRY(mkdir(path, mode)) == -1) {
72 if (TEMP_FAILURE_RETRY(chmod(path, mode)) == -1) {
76 if (TEMP_FAILURE_RETRY(chown(path, uid, gid)) == -1) {
85 int fd = TEMP_FAILURE_RETRY(open(path, O_RDONLY));
92 if (TEMP_FAILURE_RETRY(read(fd, buf, BUF_SIZE)) == -1) {
116 int fd = TEMP_FAILURE_RETRY(mkstemp(temp));
128 if (TEMP_FAILURE_RETRY(write(fd, buf, len)) < len) {
H A Dashmem-host.c46 if (fd != -1 && TEMP_FAILURE_RETRY(ftruncate(fd, size)) != -1 && unlink(template) != -1) {
H A Dfs_config.c168 fd = TEMP_FAILURE_RETRY(open(name, O_RDONLY | O_BINARY));
173 fd = TEMP_FAILURE_RETRY(open(dir ? conf_dir : conf_file, O_RDONLY | O_BINARY));
213 while (TEMP_FAILURE_RETRY(read(fd, &header, sizeof(header))) == sizeof(header)) {
226 if (TEMP_FAILURE_RETRY(read(fd, prefix, remainder)) != remainder) {
H A Dklog.c61 TEMP_FAILURE_RETRY(writev(klog_fd, iov, iov_count));
/system/core/include/utils/
H A DCompat.h64 * TEMP_FAILURE_RETRY is defined by some, but not all, versions of
68 #ifndef TEMP_FAILURE_RETRY
70 #define TEMP_FAILURE_RETRY(exp) ({ \ macro
/system/extras/squashfs_utils/
H A Dsquashfs_utils.c35 data_device = TEMP_FAILURE_RETRY(open(blk_device, O_RDONLY | O_CLOEXEC));
41 if (TEMP_FAILURE_RETRY(read(data_device, &sb, sizeof(sb)))
/system/core/libsuspend/
H A Dautosuspend_autosleep.c43 ret = TEMP_FAILURE_RETRY(write(autosleep_fd, sleep_state, strlen(sleep_state)));
65 ret = TEMP_FAILURE_RETRY(write(autosleep_fd, on_state, strlen(on_state)));
89 autosleep_fd = TEMP_FAILURE_RETRY(open(SYS_POWER_AUTOSLEEP, O_WRONLY));
H A Dautosuspend_earlysuspend.c52 int fd = TEMP_FAILURE_RETRY(open(EARLYSUSPEND_WAIT_FOR_FB_WAKE, O_RDONLY, 0));
54 err = TEMP_FAILURE_RETRY(read(fd, &buf, 1));
65 int fd = TEMP_FAILURE_RETRY(open(EARLYSUSPEND_WAIT_FOR_FB_SLEEP, O_RDONLY, 0));
67 err = TEMP_FAILURE_RETRY(read(fd, &buf, 1));
133 ret = TEMP_FAILURE_RETRY(write(sPowerStatefd, pwr_state_on, strlen(pwr_state_on)));
194 sPowerStatefd = TEMP_FAILURE_RETRY(open(EARLYSUSPEND_SYS_POWER_STATE, O_RDWR));
202 ret = TEMP_FAILURE_RETRY(write(sPowerStatefd, "on", 2));
H A Dautosuspend_wakeup_count.c56 wakeup_count_len = TEMP_FAILURE_RETRY(read(wakeup_count_fd, wakeup_count,
79 ret = TEMP_FAILURE_RETRY(write(wakeup_count_fd, wakeup_count, wakeup_count_len));
85 ret = TEMP_FAILURE_RETRY(write(state_fd, sleep_state, strlen(sleep_state)));
162 state_fd = TEMP_FAILURE_RETRY(open(SYS_POWER_STATE, O_RDWR));
169 wakeup_count_fd = TEMP_FAILURE_RETRY(open(SYS_POWER_WAKEUP_COUNT, O_RDWR));
/system/netd/client/
H A DFwmarkClient.cpp53 if (TEMP_FAILURE_RETRY(connect(mChannel, reinterpret_cast<const sockaddr*>(&FWMARK_SERVER_PATH),
86 if (TEMP_FAILURE_RETRY(sendmsg(mChannel, &message, 0)) == -1) {
92 if (TEMP_FAILURE_RETRY(recv(mChannel, &error, sizeof(error), 0)) == -1) {
/system/core/base/
H A Dfile.cpp26 #include "base/macros.h" // For TEMP_FAILURE_RETRY on Darwin.
39 while ((n = TEMP_FAILURE_RETRY(read(fd, &buf[0], sizeof(buf)))) > 0) {
49 TEMP_FAILURE_RETRY(open(path.c_str(), O_RDONLY | O_CLOEXEC | O_NOFOLLOW));
62 ssize_t n = TEMP_FAILURE_RETRY(write(fd, p, left));
83 int fd = TEMP_FAILURE_RETRY(
111 int fd = TEMP_FAILURE_RETRY(
127 ssize_t n = TEMP_FAILURE_RETRY(read(fd, p, remaining));
139 ssize_t n = TEMP_FAILURE_RETRY(write(fd, p, remaining));
/system/core/base/include/base/
H A Dmacros.h21 #include <unistd.h> // for TEMP_FAILURE_RETRY
23 // bionic and glibc both have TEMP_FAILURE_RETRY, but eg Mac OS' libc doesn't.
24 #ifndef TEMP_FAILURE_RETRY
25 #define TEMP_FAILURE_RETRY(exp) \ macro
/system/extras/simpleperf/
H A Dworkload.cpp85 ssize_t nread = TEMP_FAILURE_RETRY(read(start_signal_fd, &start_signal, 1));
93 TEMP_FAILURE_RETRY(write(exec_child_fd, &exec_child_failed, 1));
106 ssize_t nwrite = TEMP_FAILURE_RETRY(write(start_signal_fd_, &start_signal, 1));
112 ssize_t nread = TEMP_FAILURE_RETRY(read(exec_child_fd_, &exec_child_failed, 1));
137 pid_t result = TEMP_FAILURE_RETRY(waitpid(work_pid_, &status, (no_hang ? WNOHANG : 0)));
/system/core/libsysutils/src/
H A DFrameworkClient.cpp24 ret = TEMP_FAILURE_RETRY(write(mSocket, msg, strlen(msg) +1));
H A DNetlinkListener.cpp55 count = TEMP_FAILURE_RETRY(uevent_kernel_recv(socket,
/system/core/adb/
H A Dsysdeps.h28 * TEMP_FAILURE_RETRY is defined by some, but not all, versions of
32 #ifndef TEMP_FAILURE_RETRY
34 #define TEMP_FAILURE_RETRY(exp) ({ \ macro
327 return TEMP_FAILURE_RETRY( open(path, options) );
336 return TEMP_FAILURE_RETRY( open( path, options, mode ) );
342 return TEMP_FAILURE_RETRY( open( pathname, options, mode ) );
348 int fd = TEMP_FAILURE_RETRY( open( pathname, options ) );
374 return TEMP_FAILURE_RETRY( read( fd, buf, len ) );
382 return TEMP_FAILURE_RETRY( write( fd, buf, len ) );
403 int fd = TEMP_FAILURE_RETRY( crea
[all...]
/system/core/debuggerd/
H A Ddebuggerd.cpp200 status = TEMP_FAILURE_RETRY(poll(pollfds, 1, 3000));
208 status = TEMP_FAILURE_RETRY(read(fd, &msg, sizeof(msg)));
272 int fd = TEMP_FAILURE_RETRY(open(exeline, O_RDONLY | O_CLOEXEC));
281 ssize_t bytes = TEMP_FAILURE_RETRY(read(fd, &ehdr, sizeof(ehdr)));
305 if (TEMP_FAILURE_RETRY(write(sock_fd, &msg, sizeof(msg))) != (ssize_t) sizeof(msg)) {
312 if (TEMP_FAILURE_RETRY(read(sock_fd, &ack, 1)) == -1) {
320 while ((bytes_read = TEMP_FAILURE_RETRY(read(sock_fd, buffer, sizeof(buffer)))) > 0) {
324 bytes_written = TEMP_FAILURE_RETRY(write(fd, buffer + bytes_read - bytes_to_send,
389 if (TEMP_FAILURE_RETRY(write(fd, "\0", 1)) != 1) {
/system/core/fs_mgr/
H A Dfs_mgr_verity.c164 data_device = TEMP_FAILURE_RETRY(open(blk_device, O_RDONLY | O_CLOEXEC));
170 if (TEMP_FAILURE_RETRY(lseek64(data_device, 1024, SEEK_SET)) < 0) {
176 if (TEMP_FAILURE_RETRY(read(data_device, &sb, sizeof(sb))) != sizeof(sb)) {
222 device = TEMP_FAILURE_RETRY(open(block_device, O_RDONLY | O_CLOEXEC));
228 if (TEMP_FAILURE_RETRY(lseek64(device, device_size, SEEK_SET)) < 0) {
234 if (TEMP_FAILURE_RETRY(read(device, &magic_number, sizeof(magic_number))) !=
254 if (TEMP_FAILURE_RETRY(read(device, &protocol_version,
270 if (TEMP_FAILURE_RETRY(read(device, *signature, RSANUMBYTES)) != RSANUMBYTES) {
281 if (TEMP_FAILURE_RETRY(read(device, &table_length, sizeof(table_length))) !=
293 if (TEMP_FAILURE_RETRY(rea
[all...]
/system/core/liblog/
H A Dlogd_write.c106 pstore_fd = TEMP_FAILURE_RETRY(open("/dev/pmsg0", O_WRONLY));
110 i = TEMP_FAILURE_RETRY(socket(PF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0));
113 } else if (TEMP_FAILURE_RETRY(fcntl(i, F_SETFL, O_NONBLOCK)) < 0) {
122 if (TEMP_FAILURE_RETRY(connect(i, (struct sockaddr *)&un,
223 ret = TEMP_FAILURE_RETRY(writev(logd_fd, newVec + 1, 2));
248 TEMP_FAILURE_RETRY(writev(pstore_fd, newVec, i));
272 ret = TEMP_FAILURE_RETRY(writev(logd_fd, newVec + 1, i - 1));
290 ret = TEMP_FAILURE_RETRY(writev(logd_fd, newVec + 1, i - 1));
/system/extras/ext4_utils/
H A Dext4_crypt_init_extensions.cpp63 int rc = TEMP_FAILURE_RETRY(poll(&poll_sock, 1, vold_command_timeout_ms));
75 rc = TEMP_FAILURE_RETRY(read(sock, buffer, sizeof(buffer)));
/system/core/logd/
H A Dmain.cpp339 int sock = TEMP_FAILURE_RETRY(
347 ssize_t ret = TEMP_FAILURE_RETRY(write(sock, reinit, sizeof(reinit)));
355 ret = TEMP_FAILURE_RETRY(poll(&p, 1, 100));
365 ret = TEMP_FAILURE_RETRY(read(sock, buffer, sizeof(buffer)));
470 TEMP_FAILURE_RETRY(pause());

Completed in 1194 milliseconds

123