L4Re Operating System Framework
Interface and Usage Documentation
|
Interface for a POSIX file that provides regular file semantics. More...
#include <vfs.h>
Public Member Functions | |
virtual L4::Cap< L4Re::Dataspace > | data_space () noexcept=0 |
Get an L4Re::Dataspace object for the file. | |
virtual ssize_t | readv (const struct iovec *, int iovcnt) noexcept=0 |
Read one or more blocks of data from the file. | |
virtual ssize_t | writev (const struct iovec *, int iovcnt) noexcept=0 |
Write one or more blocks of data to the file. | |
virtual off64_t | lseek64 (off64_t, int) noexcept=0 |
Change the file pointer. | |
virtual int | ftruncate64 (off64_t pos) noexcept=0 |
Truncate the file at the given position. | |
virtual int | fsync () const noexcept=0 |
Sync the data and meta data to persistent storage. | |
virtual int | fdatasync () const noexcept=0 |
Sync the data to persistent storage. | |
virtual int | get_lock (struct flock64 *lock) noexcept=0 |
Test if the given lock can be placed in the file. | |
virtual int | set_lock (struct flock64 *lock, bool wait) noexcept=0 |
Acquire or release the given lock on the file. | |
Interface for a POSIX file that provides regular file semantics.
Real objects always use the combined L4Re::Vfs::File interface.
|
pure virtualnoexcept |
Get an L4Re::Dataspace object for the file.
This is used as a backend for POSIX mmap and mmap2 functions.
Implemented in L4Re::Vfs::Be_file.
|
pure virtualnoexcept |
Sync the data to persistent storage.
This is the backend for POSIX fdatasync.
Implemented in L4Re::Vfs::Be_file.
|
pure virtualnoexcept |
Sync the data and meta data to persistent storage.
This is the backend for POSIX fsync.
Implemented in L4Re::Vfs::Be_file.
|
pure virtualnoexcept |
Truncate the file at the given position.
This function is the backend for truncate and friends.
pos | The offset at which the file shall be truncated. |
Implemented in L4Re::Vfs::Be_file.
|
pure virtualnoexcept |
Test if the given lock can be placed in the file.
This function is used as backend for fcntl F_GETLK commands.
lock | The lock that shall be placed on the file. The l_type member will contain F_UNLCK if the lock could be placed. |
Implemented in L4Re::Vfs::Be_file.
|
pure virtualnoexcept |
Change the file pointer.
This is the backend for POSIX seek, lseek and friends.
Implemented in L4Re::Vfs::Be_file.
|
pure virtualnoexcept |
Read one or more blocks of data from the file.
This function acts as backend for POSIX read and readv calls and reads data starting from the f_pos pointer of that open file. The file pointer is advanced according to the number of bytes read.
Implemented in L4Re::Vfs::Be_file.
|
pure virtualnoexcept |
Acquire or release the given lock on the file.
This function is used as backend for fcntl F_SETLK and F_SETLKW commands.
lock | The lock that shall be placed on the file. |
wait | If true, then block if there is a conflicting lock on the file. |
Implemented in L4Re::Vfs::Be_file.
|
pure virtualnoexcept |
Write one or more blocks of data to the file.
This function acts as backend for POSIX write and writev calls. The data is written starting at the current file pointer and the file pointer must be advanced according to the number of written bytes.
Implemented in L4Re::Vfs::Be_file.