Home
last modified time | relevance | path

Searched refs:HANDLE_EINTR (Results 1 – 25 of 55) sorted by relevance

123

/external/google-breakpad/src/common/tests/
Dfile_utils.cc45 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/
Dfile_posix.cc54 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 …]
Dfile_util_posix.cc437 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()
821 int fd = HANDLE_EINTR(open(filename.value().c_str(), O_RDONLY)); in ReadFile()
825 ssize_t bytes_read = HANDLE_EINTR(read(fd, data, max_size)); in ReadFile()
833 int fd = HANDLE_EINTR(creat(filename.value().c_str(), 0666)); in WriteFile()
849 HANDLE_EINTR(write(fd, data + bytes_written_total, in WriteFileDescriptor()
863 int fd = HANDLE_EINTR(open(filename.value().c_str(), O_WRONLY | O_APPEND)); in AppendToFile()
/external/libbrillo/brillo/
Dfile_utils.cc68 base::ScopedFD scoped_fd(HANDLE_EINTR(openat( in RegularFileOrDelete()
121 base::ScopedFD scoped_fd(HANDLE_EINTR(openat( in TouchFileInternal()
172 HANDLE_EINTR(fchmod(scoped_fd.get(), new_file_permissions)) == -1) { in TouchFile()
221 int fd = HANDLE_EINTR(open(path.value().c_str(), flags)); in SyncFileOrDirectory()
229 (data_sync ? HANDLE_EINTR(fdatasync(fd)) : HANDLE_EINTR(fsync(fd))); in SyncFileOrDirectory()
268 HANDLE_EINTR(open(temp_name.c_str(), O_CREAT | O_EXCL | O_WRONLY, mode)); in WriteToFileAtomic()
278 HANDLE_EINTR(write(fd, data + position, size - position)); in WriteToFileAtomic()
288 if (HANDLE_EINTR(fdatasync(fd)) < 0) { in WriteToFileAtomic()
Dprocess.cc250 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()
/external/libchrome/mojo/public/cpp/platform/
Dsocket_utils_posix.cc84 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/libchrome/base/memory/
Dshared_memory_posix.cc124 fd.reset(HANDLE_EINTR( in Create()
135 fd.reset(HANDLE_EINTR( in Create()
140 fd.reset(HANDLE_EINTR(open(path.value().c_str(), O_RDWR | O_APPEND))); in Create()
163 readonly_fd.reset(HANDLE_EINTR(open(path.value().c_str(), O_RDONLY))); in Create()
178 if (HANDLE_EINTR(ftruncate(fd.get(), options.size)) != 0) in Create()
232 ScopedFD fd(HANDLE_EINTR(open(path.value().c_str(), mode))); in Open()
233 ScopedFD readonly_fd(HANDLE_EINTR(open(path.value().c_str(), O_RDONLY))); in Open()
Dplatform_shared_memory_region_posix.cc128 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()
Dshared_memory_helper.cc59 readonly_fd->reset(HANDLE_EINTR(open(path->value().c_str(), O_RDONLY))); in CreateAnonymousSharedMemory()
97 *mapped_file = HANDLE_EINTR(dup(fd.get())); in PrepareMapFile()
/external/libchrome/base/posix/
Deintr_wrapper.h28 #define HANDLE_EINTR(x) ({ \ macro
38 #define HANDLE_EINTR(x) ({ \ macro
63 #define HANDLE_EINTR(x) (x) macro
Dfile_descriptor_shuffle.cc87 *result = HANDLE_EINTR(dup(fd)); in Duplicate()
92 return HANDLE_EINTR(dup2(src, dest)) != -1; in Move()
/external/libbrillo/brillo/streams/
Dfile_stream.cc42 return HANDLE_EINTR(read(fd_, buf, nbyte)); in Read()
46 return HANDLE_EINTR(write(fd_, buf, nbyte)); in Write()
68 return HANDLE_EINTR(ftruncate(fd_, length)); in Truncate()
147 int res = HANDLE_EINTR(select(fd_ + 1, &read_fds, &write_fds, &error_fds, in WaitForDataBlocking()
242 int fd = HANDLE_EINTR(open(path.value().c_str(), open_flags, creation_mode)); in Open()
247 if (HANDLE_EINTR(fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK)) < 0) { in Open()
274 int fd = HANDLE_EINTR(open(path.value().c_str(), open_flags, creation_mode)); in CreateTemporary()
298 int fd_flags = HANDLE_EINTR(fcntl(file_descriptor, F_GETFL)); in FromFileDescriptor()
314 if (HANDLE_EINTR(fcntl(file_descriptor, F_SETFL, fd_flags)) < 0) { in FromFileDescriptor()
/external/libbrillo/brillo/message_loops/
Dmessage_loop_unittest.cc157 EXPECT_EQ(0, HANDLE_EINTR(close(pipe.writer))); in TYPED_TEST()
174 EXPECT_EQ(1, HANDLE_EINTR(write(pipe.writer, "a", 1))); in TYPED_TEST()
191 EXPECT_EQ(1, HANDLE_EINTR(write(pipe.writer, "a", 1))); in TYPED_TEST()
209 EXPECT_EQ(1, HANDLE_EINTR(write(socks.right, "a", 1))); in TYPED_TEST()
342 EXPECT_EQ(1, HANDLE_EINTR(read(pipes[i].reader, &c, 1))); in TYPED_TEST()
357 HANDLE_EINTR(write(pipes[i].writer, blob.data(), blob.size()))); in TYPED_TEST()
/external/google-breakpad/src/client/linux/minidump_writer/
Dminidump_writer_unittest.cc75 IGNORE_RET(HANDLE_EINTR(read(fds[0], &b, sizeof(b)))); in TEST()
104 HANDLE_EINTR(read(fds[0], &b, sizeof(b))); in TEST()
169 IGNORE_RET(HANDLE_EINTR(read(fds[0], &b, sizeof(b)))); in TEST()
290 IGNORE_RET(HANDLE_EINTR(read(fds[0], &b, sizeof(b)))); in TEST()
379 const int r = HANDLE_EINTR(poll(&pfd, 1, 1000)); in TEST()
383 const int nr = HANDLE_EINTR(read(fds[0], &junk, sizeof(junk))); in TEST()
456 HANDLE_EINTR(read(fds[0], &b, sizeof(b))); in TEST()
514 HANDLE_EINTR(read(fds[0], &b, sizeof(b))); in TEST()
623 const int r = HANDLE_EINTR(poll(&pfd, 1, 1000)); in TEST()
/external/libchrome/base/
Drand_util_posix.cc29 URandomFd() : fd_(HANDLE_EINTR(open("/dev/urandom", O_RDONLY))) { in URandomFd()
33 URandomFd() : fd_(HANDLE_EINTR(open("/dev/urandom", O_RDONLY | O_CLOEXEC))) {
Dsys_info_posix.cc90 if (HANDLE_EINTR(statfs(path.value().c_str(), &stats)) != 0) in IsStatsZeroIfUnlimited()
110 if (HANDLE_EINTR(statvfs(path.value().c_str(), &stats)) != 0) in GetDiskSpaceInfo()
/external/libchrome/base/process/
Dprocess_posix.cc57 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()
Dlaunch_posix.cc394 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/google-breakpad/src/client/linux/crash_generation/
Dcrash_generation_client.cc75 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()
Dcrash_generation_server.cc121 HANDLE_EINTR(write(control_pipe_out_, &kCommandQuit, 1)); in Stop()
218 const ssize_t msg_size = HANDLE_EINTR(recvmsg(server_fd_, &msg, 0)); in ClientEvent()
/external/v4l2_codec2/vda/
Dv4l2_device.cc139 return HANDLE_EINTR(ioctl(device_fd_.get(), request, arg)); in Ioctl()
159 if (HANDLE_EINTR(poll(pollfds, nfds, -1)) == -1) { in Poll()
184 if (HANDLE_EINTR(write(device_poll_interrupt_fd_.get(), &buf, sizeof(buf))) == in SetDevicePollInterrupt()
196 if (HANDLE_EINTR(read(device_poll_interrupt_fd_.get(), &buf, sizeof(buf))) == in ClearDevicePollInterrupt()
384 HANDLE_EINTR(open(path.c_str(), O_RDWR | O_NONBLOCK | O_CLOEXEC))); in OpenDevicePath()
/external/libchrome/base/test/
Dtest_file_util_posix.cc33 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/debug/
Dproc_maps_linux.cc52 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/google-breakpad/src/client/linux/handler/
Dexception_handler_unittest.cc135 ASSERT_NE(HANDLE_EINTR(waitpid(process_id, &status, 0)), -1); in WaitForProcessToTerminate()
147 const int r = HANDLE_EINTR(poll(&pfd, 1, 0)); in ReadMinidumpPathFromPipe()
192 IGNORE_RET(HANDLE_EINTR(sys_write(fd, &len, sizeof(len)))); in DoneCallback()
193 IGNORE_RET(HANDLE_EINTR(sys_write(fd, descriptor.path(), len))); in DoneCallback()
917 ssize_t ret = HANDLE_EINTR(sys_sendmsg(fd, &msg, 0)); in CrashHandler()
923 IGNORE_RET(HANDLE_EINTR(sys_read(fds[0], &b, 1))); in CrashHandler()
959 const ssize_t n = HANDLE_EINTR(recvmsg(fds[0], &msg, 0)); in TEST()
991 ASSERT_EQ(1, (HANDLE_EINTR(write(signal_fd, &b, 1)))); in TEST()
1166 HANDLE_EINTR(read(fds[0], &b, sizeof(b))); in TEST()
/external/libchrome/base/message_loop/
Dmessage_pump_glib.cc237 const int num_bytes = HANDLE_EINTR(read(wakeup_pipe_read_, msg, 2)); in HandleCheck()
342 if (HANDLE_EINTR(write(wakeup_pipe_write_, &msg, 1)) != 1) { in ScheduleWork()

123