L4Re - L4 Runtime Environment
|
Interface for a POSIX file that provides regular file semantics. More...
#include <vfs.h>
Public Member Functions | |
virtual L4::Cap< L4Re::Dataspace > | data_space () const =0 throw () |
Get an L4Re::Dataspace object for the file. More... | |
virtual ssize_t | readv (const struct iovec *, int iovcnt)=0 throw () |
Read one or more blocks of data from the file. More... | |
virtual ssize_t | writev (const struct iovec *, int iovcnt)=0 throw () |
Write one or more blocks of data to the file. More... | |
virtual off64_t | lseek64 (off64_t, int)=0 throw () |
Change the file pointer. More... | |
virtual int | ftruncate64 (off64_t pos)=0 throw () |
Truncate the file at the given position. More... | |
virtual int | fsync () const =0 throw () |
Sync the data and meta data to persistent storage. More... | |
virtual int | fdatasync () const =0 throw () |
Sync the data to persistent storage. More... | |
virtual int | get_lock (struct flock64 *lock)=0 throw () |
Test if the given lock can be placed in the file. More... | |
virtual int | set_lock (struct flock64 *lock, bool wait)=0 throw () |
Acquire or release the given lock on the file. More... | |
Interface for a POSIX file that provides regular file semantics.
Real objects use always the combined L4Re::Vfs::File interface.
|
pure virtual |
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 virtual |
Sync the data to persistent storage.
This is the backend for POSIX fdatasync.
Implemented in L4Re::Vfs::Be_file.
|
pure virtual |
Sync the data and meta data to persistent storage.
This is the backend for POSIX fsync.
Implemented in L4Re::Vfs::Be_file.
|
pure virtual |
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 virtual |
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 virtual |
Change the file pointer.
This is the backend for POSIX seek, lseek and friends.
Implemented in L4Re::Vfs::Be_file.
|
pure virtual |
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 for the f_pos pointer of that open file. The file pointer is advanced according to the number of red bytes.
Implemented in L4Re::Vfs::Be_file.
|
pure virtual |
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 virtual |
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.