1 #ifndef COMPLETE_PREAD_H
2 #define COMPLETE_PREAD_H 1
6 // A wrapper around pread() that retries on short reads and EINTR,
7 // so you never need to call it twice. Always synchronous (no io_uring).
8 bool try_complete_pread(int fd, void *ptr, size_t len, off_t offset);
10 // Same, but exit on failure, so never returns a short read.
11 void complete_pread(int fd, void *ptr, size_t len, off_t offset);
13 #endif // !defined(COMPLETE_PREAD_H)