|
AquilaOS documentation
How it works, and its code
|
The generic read operation for files that are vnodes: regular files, and devices, pipes and FIFOs, which may have to wait for data. More...
#include <core/system.h>#include <fs/vfs.h>#include <fs/iobuf.h>#include <core/arch.h>#include <dev/dev.h>#include <sys/sched.h>#include <aquila/fcntl.h>#include <aquila/errno.h>#include <aquila/dirent.h>Go to the source code of this file.
Functions | |
| ssize_t | posix_file_read (struct file *file, struct iobuf *io) |
| Reads from an open file at its offset, and moves the offset past what was read. | |
The generic read operation for files that are vnodes: regular files, and devices, pipes and FIFOs, which may have to wait for data.
Definition in file read.c.
Reads from an open file at its offset, and moves the offset past what was read.
If there is nothing to read yet, it waits for data (a pipe's, a terminal's), unless the file is non-blocking.
| file | the open file |
| io | where the data goes, and how much is wanted |
Definition at line 29 of file read.c.
References arch_rtime_ns(), file::flags, ISDEV, kdev_fops(), NULL, file::offset, posix_file_read(), fops::read_timeout, iobuf::resid, sched_wait(), vfs_file_eof(), vfs_read_io(), VNODE_DEV, and waitq_wakeup().
Referenced by posix_file_read().