Lines Matching refs:byte_count

70 static ssize_t pread(int fd, void* data, size_t byte_count, off64_t offset) {  in pread()  argument
84 if (!ReadFile(handle, data, static_cast<DWORD>(byte_count), &bytes_read, &overlapped)) { in pread()
362 int64_t FdFile::Read(char* buf, int64_t byte_count, int64_t offset) const { in Read() argument
364 int rc = TEMP_FAILURE_RETRY(pread64(fd_, buf, byte_count, offset)); in Read()
366 int rc = TEMP_FAILURE_RETRY(pread(fd_, buf, byte_count, offset)); in Read()
388 int64_t FdFile::Write(const char* buf, int64_t byte_count, int64_t offset) { in Write() argument
391 int rc = TEMP_FAILURE_RETRY(pwrite64(fd_, buf, byte_count, offset)); in Write()
393 int rc = TEMP_FAILURE_RETRY(pwrite(fd_, buf, byte_count, offset)); in Write()
421 static bool ReadFullyGeneric(int fd, void* buffer, size_t byte_count, size_t offset) { in ReadFullyGeneric() argument
423 while (byte_count > 0) { in ReadFullyGeneric()
424 ssize_t bytes_read = TEMP_FAILURE_RETRY(read_func(fd, ptr, byte_count, offset)); in ReadFullyGeneric()
430 byte_count -= bytes_read; // Reduce the number of remaining bytes. in ReadFullyGeneric()
437 bool FdFile::ReadFully(void* buffer, size_t byte_count) { in ReadFully() argument
438 return ReadFullyGeneric<ReadIgnoreOffset>(fd_, buffer, byte_count, 0); in ReadFully()
441 bool FdFile::PreadFully(void* buffer, size_t byte_count, size_t offset) { in PreadFully() argument
442 return ReadFullyGeneric<pread>(fd_, buffer, byte_count, offset); in PreadFully()
446 bool FdFile::WriteFullyGeneric(const void* buffer, size_t byte_count, size_t offset) { in WriteFullyGeneric() argument
451 while (byte_count > 0) { in WriteFullyGeneric()
453 ? TEMP_FAILURE_RETRY(pwrite(fd_, ptr, byte_count, offset)) in WriteFullyGeneric()
454 : TEMP_FAILURE_RETRY(write(fd_, ptr, byte_count)); in WriteFullyGeneric()
458 byte_count -= bytes_written; // Reduce the number of remaining bytes. in WriteFullyGeneric()
465 bool FdFile::PwriteFully(const void* buffer, size_t byte_count, size_t offset) { in PwriteFully() argument
466 return WriteFullyGeneric<true>(buffer, byte_count, offset); in PwriteFully()
469 bool FdFile::WriteFully(const void* buffer, size_t byte_count) { in WriteFully() argument
470 return WriteFullyGeneric<false>(buffer, byte_count, 0u); in WriteFully()