/external/google-breakpad/src/common/tests/ |
D | file_utils.cc | 45 int infile = HANDLE_EINTR(open(from_path, O_RDONLY)); in CopyFile() 51 int outfile = HANDLE_EINTR(creat(to_path, 0666)); in CopyFile() 64 ssize_t bytes_read = HANDLE_EINTR(read(infile, buffer, sizeof(buffer))); in CopyFile() 74 ssize_t bytes_written_partial = HANDLE_EINTR(write( in CopyFile() 100 int fd = HANDLE_EINTR(open(path, O_RDONLY)); in ReadFile() 109 *buffer_size = HANDLE_EINTR(read(fd, buffer, *buffer_size)); in ReadFile() 123 int fd = HANDLE_EINTR(open(path, O_CREAT | O_TRUNC | O_WRONLY, S_IRWXU)); in WriteFile() 136 HANDLE_EINTR(write(fd, data + bytes_written_total, in WriteFile()
|
/external/libchrome/base/files/ |
D | file_posix.cc | 54 return HANDLE_EINTR(ftruncate(file, length)); in CallFtruncate() 81 if (HANDLE_EINTR(fcntl(file, F_SETLK, &lock)) == -1) in CallFcntlFlock() 216 rv = HANDLE_EINTR(pread(file_.get(), data + bytes_read, in Read() 238 rv = HANDLE_EINTR(read(file_.get(), data + bytes_read, size - bytes_read)); in ReadAtCurrentPos() 252 return HANDLE_EINTR(pread(file_.get(), data, size, offset)); in ReadNoBestEffort() 262 return HANDLE_EINTR(read(file_.get(), data, size)); in ReadAtCurrentPosNoBestEffort() 285 rv = HANDLE_EINTR(pwrite64(file_.get(), data + bytes_written, in Write() 288 rv = HANDLE_EINTR(pwrite(file_.get(), data + bytes_written, in Write() 311 rv = HANDLE_EINTR(write(file_.get(), data + bytes_written, in WriteAtCurrentPos() 329 return HANDLE_EINTR(write(file_.get(), data, size)); in WriteAtCurrentPosNoBestEffort() [all …]
|
D | file_util_posix.cc | 437 if (HANDLE_EINTR(fcntl(fd, F_SETFL, flags | O_NONBLOCK)) == -1) in SetNonBlocking() 452 if (HANDLE_EINTR(fcntl(fd, F_SETFD, flags | FD_CLOEXEC)) == -1) in SetCloseOnExec() 486 HANDLE_EINTR(read(fd, buffer + total_read, bytes - total_read)); in ReadFromFD() 504 return HANDLE_EINTR(mkstemp(buffer)); in CreateAndOpenFdForTemporaryFileInDir() 559 if (HANDLE_EINTR(chmod(path.value().c_str(), updated_mode_bits)) != 0) in SetPosixFilePermissions() 822 int fd = HANDLE_EINTR(open(filename.value().c_str(), O_RDONLY)); in ReadFile() 826 ssize_t bytes_read = HANDLE_EINTR(read(fd, data, max_size)); in ReadFile() 834 int fd = HANDLE_EINTR(creat(filename.value().c_str(), 0666)); in WriteFile() 850 HANDLE_EINTR(write(fd, data + bytes_written_total, in WriteFileDescriptor() 864 int fd = HANDLE_EINTR(open(filename.value().c_str(), O_WRONLY | O_APPEND)); in AppendToFile()
|
D | file_path_watcher_kqueue.cc | 82 int fd = HANDLE_EINTR(open(path.value().c_str(), O_EVTONLY)); in FileDescriptorForPath() 212 int count = HANDLE_EINTR(kevent(kqueue_, &events_[0], valid, &updates[0], in UpdateWatches() 259 int count = HANDLE_EINTR(kevent(kqueue_, &events_[0], last_entry, in Watch() 309 int count = HANDLE_EINTR(kevent(kqueue_, NULL, 0, &updates[0], updates.size(), in OnKQueueReadable()
|
/external/libchrome/base/posix/ |
D | eintr_wrapper.h | 28 #define HANDLE_EINTR(x) ({ \ macro 38 #define HANDLE_EINTR(x) ({ \ macro 63 #define HANDLE_EINTR(x) (x) macro
|
D | file_descriptor_shuffle.cc | 87 *result = HANDLE_EINTR(dup(fd)); in Duplicate() 92 return HANDLE_EINTR(dup2(src, dest)) != -1; in Move()
|
/external/libchrome/mojo/public/cpp/platform/ |
D | socket_utils_posix.cc | 84 return HANDLE_EINTR(write(socket, bytes, num_bytes)); in SocketWrite() 94 return HANDLE_EINTR(writev(socket, iov, static_cast<int>(num_iov))); in SocketWritev() 99 return HANDLE_EINTR(sendmsg(socket, &msg, kSendmsgFlags)); in SocketWritev() 126 return HANDLE_EINTR(sendmsg(socket, &msg, kSendmsgFlags)); in SendmsgWithHandles() 142 HANDLE_EINTR(recvmsg(socket, &msg, block ? 0 : MSG_DONTWAIT)); in SocketRecvmsg() 179 base::ScopedFD accepted_handle(HANDLE_EINTR(accept(server_fd, nullptr, 0))); in AcceptSocketConnection()
|
/external/libbrillo/brillo/ |
D | file_utils.cc | 75 base::ScopedFD scoped_fd(HANDLE_EINTR(openat( in RegularFileOrDelete() 128 base::ScopedFD scoped_fd(HANDLE_EINTR(openat( in TouchFileInternal() 170 fd.reset(HANDLE_EINTR(openat(parent_fd, file.c_str(), in OpenPathComponentInternal() 174 fd.reset(HANDLE_EINTR(open( in OpenPathComponentInternal() 253 HANDLE_EINTR(fchmod(scoped_fd.get(), new_file_permissions)) == -1) { in TouchFile() 422 int fd = HANDLE_EINTR(open(path.value().c_str(), flags)); in SyncFileOrDirectory() 430 (data_sync ? HANDLE_EINTR(fdatasync(fd)) : HANDLE_EINTR(fsync(fd))); in SyncFileOrDirectory() 469 HANDLE_EINTR(open(temp_name.c_str(), O_CREAT | O_EXCL | O_WRONLY, mode)); in WriteToFileAtomic() 479 HANDLE_EINTR(write(fd, data + position, size - position)); in WriteToFileAtomic() 489 if (HANDLE_EINTR(fdatasync(fd)) < 0) { in WriteToFileAtomic()
|
D | process.cc | 250 HANDLE_EINTR(open(input_file_.c_str(), in Start() 261 if (HANDLE_EINTR(dup2(input_handle, STDIN_FILENO)) < 0) { in Start() 270 int output_handle = HANDLE_EINTR(open( in Start() 278 HANDLE_EINTR(dup2(output_handle, STDOUT_FILENO)); in Start() 279 HANDLE_EINTR(dup2(output_handle, STDERR_FILENO)); in Start() 334 if (HANDLE_EINTR(waitpid(pid_, &status, 0)) < 0) { in Wait()
|
D | scoped_mount_namespace.cc | 43 HANDLE_EINTR(open(kCurrentMountNamespacePath, O_RDONLY))); in CreateFromPath() 51 HANDLE_EINTR(open(ns_path.value().c_str(), O_RDONLY))); in CreateFromPath()
|
/external/libchrome/base/memory/ |
D | shared_memory_posix.cc | 122 fd.reset(HANDLE_EINTR( in Create() 133 fd.reset(HANDLE_EINTR( in Create() 138 fd.reset(HANDLE_EINTR(open(path.value().c_str(), O_RDWR | O_APPEND))); in Create() 161 readonly_fd.reset(HANDLE_EINTR(open(path.value().c_str(), O_RDONLY))); in Create() 176 if (HANDLE_EINTR(ftruncate(fd.get(), options.size)) != 0) in Create() 230 ScopedFD fd(HANDLE_EINTR(open(path.value().c_str(), mode))); in Open() 231 ScopedFD readonly_fd(HANDLE_EINTR(open(path.value().c_str(), O_RDONLY))); in Open()
|
D | shared_memory_helper.cc | 59 readonly_fd->reset(HANDLE_EINTR(open(path->value().c_str(), O_RDONLY))); in CreateAnonymousSharedMemory() 97 *mapped_file = HANDLE_EINTR(dup(fd.get())); in PrepareMapFile()
|
D | platform_shared_memory_region_posix.cc | 128 ScopedFD duped_fd(HANDLE_EINTR(dup(handle_.fd.get()))); in Duplicate() 242 readonly_fd.reset(HANDLE_EINTR(open(path.value().c_str(), O_RDONLY))); in Create() 255 if (HANDLE_EINTR(ftruncate(fd.get(), size)) != 0) in Create()
|
/external/libbrillo/brillo/streams/ |
D | file_stream.cc | 45 return HANDLE_EINTR(read(fd_, buf, nbyte)); in Read() 49 return HANDLE_EINTR(write(fd_, buf, nbyte)); in Write() 71 return HANDLE_EINTR(ftruncate(fd_, length)); in Truncate() 142 int res = HANDLE_EINTR(select(fd_ + 1, &read_fds, &write_fds, &error_fds, in WaitForDataBlocking() 232 int fd = HANDLE_EINTR(open(path.value().c_str(), open_flags, creation_mode)); in Open() 237 if (HANDLE_EINTR(fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK)) < 0) { in Open() 264 int fd = HANDLE_EINTR(open(path.value().c_str(), open_flags, creation_mode)); in CreateTemporary() 288 int fd_flags = HANDLE_EINTR(fcntl(file_descriptor, F_GETFL)); in FromFileDescriptor() 304 if (HANDLE_EINTR(fcntl(file_descriptor, F_SETFL, fd_flags)) < 0) { in FromFileDescriptor()
|
/external/google-breakpad/src/client/linux/minidump_writer/ |
D | minidump_writer_unittest.cc | 72 IGNORE_RET(HANDLE_EINTR(read(fds[0], &b, sizeof(b)))); in TEST() 102 HANDLE_EINTR(read(fds[0], &b, sizeof(b))); in TEST() 156 IGNORE_RET(HANDLE_EINTR(read(fds[0], &b, sizeof(b)))); in TEST() 232 IGNORE_RET(HANDLE_EINTR(read(fds[0], &b, sizeof(b)))); in TEST() 277 IGNORE_RET(HANDLE_EINTR(read(fds[0], &b, sizeof(b)))); in TEST() 328 IGNORE_RET(HANDLE_EINTR(read(fds[0], &b, sizeof(b)))); in TEST() 381 IGNORE_RET(HANDLE_EINTR(read(fds[0], &b, sizeof(b)))); in TEST() 462 IGNORE_RET(HANDLE_EINTR(read(fds[0], &b, sizeof(b)))); in TEST() 552 const int r = HANDLE_EINTR(poll(&pfd, 1, 1000)); in TEST() 556 const int nr = HANDLE_EINTR(read(fds[0], &junk, sizeof(junk))); in TEST() [all …]
|
/external/libchrome/base/ |
D | rand_util_posix.cc | 29 URandomFd() : fd_(HANDLE_EINTR(open("/dev/urandom", O_RDONLY))) { in URandomFd() 33 URandomFd() : fd_(HANDLE_EINTR(open("/dev/urandom", O_RDONLY | O_CLOEXEC))) {
|
/external/libbrillo/brillo/files/ |
D | safe_fd.cc | 42 fd.UnsafeReset(HANDLE_EINTR(openat(parent_fd, file.c_str(), in OpenPathComponentInternal() 45 fd.UnsafeReset(HANDLE_EINTR(open( in OpenPathComponentInternal() 222 if (HANDLE_EINTR(ftruncate(fd_.get(), size)) != 0) { in Write() 333 if (HANDLE_EINTR(fchown(file.first.get(), uid, gid)) != 0) { in MakeFile() 390 if (HANDLE_EINTR(fchown(dir.get(), uid, gid)) != 0) { in MakeDir() 422 if (HANDLE_EINTR(linkat(source_dir.get(), source_name.c_str(), fd_.get(), in Link() 440 if (HANDLE_EINTR(unlinkat(fd_.get(), name.c_str(), 0 /*flags*/)) != 0) { in Unlink() 535 if (HANDLE_EINTR(unlinkat(fd_.get(), name.c_str(), AT_REMOVEDIR)) != 0) { in Rmdir()
|
/external/google-breakpad/src/client/linux/crash_generation/ |
D | crash_generation_client.cc | 75 ssize_t ret = HANDLE_EINTR(sys_sendmsg(server_fd_, &msg, 0)); in RequestDump() 84 IGNORE_RET(HANDLE_EINTR(sys_read(fds[0], &b, 1))); in RequestDump()
|
/external/libchrome/base/process/ |
D | process_posix.cc | 57 return HANDLE_EINTR(waitpid(handle, status, 0)) > 0; in WaitpidWithTimeout() 60 pid_t ret_pid = HANDLE_EINTR(waitpid(handle, status, WNOHANG)); in WaitpidWithTimeout() 80 ret_pid = HANDLE_EINTR(waitpid(handle, status, WNOHANG)); in WaitpidWithTimeout() 107 int result = HANDLE_EINTR(kevent(kq.get(), &change, 1, NULL, 0, NULL)); in WaitForSingleNonChildProcess()
|
D | launch_posix.cc | 394 base::ScopedFD null_fd(HANDLE_EINTR(open("/dev/null", O_RDONLY))); in LaunchProcess() 400 int new_fd = HANDLE_EINTR(dup2(null_fd.get(), STDIN_FILENO)); in LaunchProcess() 450 if (HANDLE_EINTR(setsid()) != -1) { in LaunchProcess() 451 if (HANDLE_EINTR( in LaunchProcess() 521 pid_t ret = HANDLE_EINTR(waitpid(pid, nullptr, 0)); in LaunchProcess() 638 HANDLE_EINTR(read(pipe_fd[0], buffer, sizeof(buffer))); in GetAppOutputInternal()
|
/external/angle/util/posix/ |
D | crash_handler_posix.cpp | 49 # define HANDLE_EINTR(x) \ macro 59 # define HANDLE_EINTR(x) \ macro 188 int fd(HANDLE_EINTR(open("/proc/self/maps", O_RDONLY))); 204 ssize_t bytes_read = HANDLE_EINTR(read(fd, buffer, kReadSize)); 305 int mem_fd(HANDLE_EINTR(open("/proc/self/mem", O_RDONLY | O_CLOEXEC))); 310 return HANDLE_EINTR(pread(mem_fd, dst, size, src)) == ssize_t(size);
|
/external/libchrome/base/test/ |
D | test_file_util_posix.cc | 33 int rv = HANDLE_EINTR(chmod(path.value().c_str(), stat_buf.st_mode)); in DenyFilePermission() 67 int rv = HANDLE_EINTR(chmod(path.value().c_str(), *mode)); in RestorePermissionInfo()
|
/external/libchrome/base/trace_event/ |
D | trace_event_android.cc | 30 ssize_t written = HANDLE_EINTR(write( in WriteToATrace() 112 g_atrace_fd = HANDLE_EINTR(open(kATraceMarkerFile, O_WRONLY)); in StartATrace() 198 int atrace_fd = HANDLE_EINTR(open(kATraceMarkerFile, O_WRONLY | O_APPEND)); in AddClockSyncMetadataEvent()
|
/external/libchrome/base/debug/ |
D | proc_maps_linux.cc | 52 base::ScopedFD fd(HANDLE_EINTR(open("/proc/self/maps", O_RDONLY))); in ReadProcMaps() 66 ssize_t bytes_read = HANDLE_EINTR(read(fd.get(), buffer, kReadSize)); in ReadProcMaps()
|
/external/libchrome/base/android/library_loader/ |
D | library_prefetcher.cc | 82 int err = HANDLE_EINTR( in Mincore() 141 if (HANDLE_EINTR(clock_gettime(CLOCK_MONOTONIC, &ts))) { in CollectResidency() 233 const pid_t result = HANDLE_EINTR(waitpid(pid, &status, 0)); in ForkAndPrefetch()
|