um: Update UBD to use pread/pwrite family of functions
This decreases the number of syscalls per read/write by half. Signed-off-by: Anton Ivanov <aivanov@brocade.com> Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:

committed by
Richard Weinberger

parent
470a166e8c
commit
8c6157b6b3
@@ -146,6 +146,8 @@ extern int os_read_file(int fd, void *buf, int len);
|
||||
extern int os_write_file(int fd, const void *buf, int count);
|
||||
extern int os_sync_file(int fd);
|
||||
extern int os_file_size(const char *file, unsigned long long *size_out);
|
||||
extern int os_pread_file(int fd, void *buf, int len, unsigned long long offset);
|
||||
extern int os_pwrite_file(int fd, const void *buf, int count, unsigned long long offset);
|
||||
extern int os_file_modtime(const char *file, unsigned long *modtime);
|
||||
extern int os_pipe(int *fd, int stream, int close_on_exec);
|
||||
extern int os_set_fd_async(int fd);
|
||||
|
Reference in New Issue
Block a user