|
AquilaOS documentation
How it works, and its code
|
The generic write operation for files that are vnodes: regular files, and devices, pipes and FIFOs, which may have to wait for room. More...
#include <core/system.h>#include <fs/vfs.h>#include <fs/iobuf.h>#include <aquila/fcntl.h>#include <aquila/errno.h>Go to the source code of this file.
Functions | |
| ssize_t | posix_file_write (struct file *file, struct iobuf *io) |
| Writes to an open file at its offset, and moves the offset past what was written. | |
The generic write operation for files that are vnodes: regular files, and devices, pipes and FIFOs, which may have to wait for room.
Definition in file write.c.
Writes to an open file at its offset, and moves the offset past what was written.
With O_APPEND, a regular file is written at its end. A blocking write waits for room (in a pipe, say) until everything is written; a non-blocking one writes only if it can without waiting.
| file | the open file |
| io | the data, and how much of it |
Definition at line 25 of file write.c.
References iobuf::fault, file::flags, file::offset, posix_file_write(), iobuf::resid, vfs_file_can_write(), vfs_file_eof(), vfs_write_io(), waitq_sleep(), and waitq_wakeup().
Referenced by posix_file_write().