The Pedigree Project
0.1
|
Public Member Functions | |
PsAuxFile (String str, size_t inode, Filesystem *pParentFS, File *pParentNode) | |
bool | initialise () |
uint64_t | readBytewise (uint64_t location, uint64_t size, uintptr_t buffer, bool bCanBlock=true) |
uint64_t | writeBytewise (uint64_t location, uint64_t size, uintptr_t buffer, bool bCanBlock=true) |
virtual int | select (bool bWriting=false, int timeout=0) |
Public Member Functions inherited from File | |
File () | |
File (const String &name, Time::Timestamp accessedTime, Time::Timestamp modifiedTime, Time::Timestamp creationTime, uintptr_t inode, class Filesystem *pFs, size_t size, File *pParent) | |
virtual | ~File () |
virtual uint64_t | read (uint64_t location, uint64_t size, uintptr_t buffer, bool bCanBlock=true) final |
virtual uint64_t | write (uint64_t location, uint64_t size, uintptr_t buffer, bool bCanBlock=true) final |
virtual physical_uintptr_t | getPhysicalPage (size_t offset) |
virtual void | returnPhysicalPage (size_t offset) |
virtual void | sync () |
virtual void | sync (size_t offset, bool async) |
Time::Timestamp | getCreationTime () |
void | setCreationTime (Time::Timestamp t) |
Time::Timestamp | getAccessedTime () |
void | setAccessedTime (Time::Timestamp t) |
Time::Timestamp | getModifiedTime () |
void | setModifiedTime (Time::Timestamp t) |
String | getName () const |
void | getName (String &s) const |
virtual String | getFullPath (bool bWithLabel=true) |
virtual void | truncate () |
size_t | getSize () |
void | setSize (size_t sz) |
virtual bool | isSymlink () |
virtual bool | isDirectory () |
virtual bool | isPipe () const |
virtual bool | isFifo () const |
virtual bool | isSocket () const |
uintptr_t | getInode () const |
virtual void | setInode (uintptr_t inode) |
Filesystem * | getFilesystem () const |
void | setFilesystem (Filesystem *pFs) |
virtual void | fileAttributeChanged () |
virtual void | increaseRefCount (bool bIsWriter) |
virtual void | decreaseRefCount (bool bIsWriter) |
void | setPermissions (uint32_t perms) |
uint32_t | getPermissions () const |
void | setUid (size_t uid) |
size_t | getUid () const |
void | setGid (size_t gid) |
size_t | getGid () const |
File * | getParent () const |
void | monitor (Thread *pThread, Event *pEvent) |
void | cullMonitorTargets (Thread *pThread) |
virtual bool | supports (const size_t command) const |
virtual int | command (const size_t command, void *buffer) |
virtual size_t | getBlockSize () const |
void | enableDirect () |
void | disableDirect () |
virtual void | preallocate (size_t expectedSize, bool zero=true) |
virtual File * | open () |
Private Member Functions | |
void | handleIncoming (const void *buffer, size_t len) |
virtual bool | isBytewise () const |
Static Private Member Functions | |
static void | subscriber (void *param, const void *buffer, size_t len) |
Private Attributes | |
Mutex | m_Lock |
Buffer< uint8_t > | m_Buffer |
Additional Inherited Members | |
Protected Member Functions inherited from File | |
virtual uintptr_t | readBlock (uint64_t location) |
virtual void | writeBlock (uint64_t location, uintptr_t addr) |
virtual void | extend (size_t newSize) |
virtual void | extend (size_t newSize, uint64_t location, uint64_t size) |
void | dataChanged () |
void | getFilesystemLabel (HugeStaticString &s) |
virtual void | pinBlock (uint64_t location) |
virtual void | unpinBlock (uint64_t location) |
void | evict (uint64_t location) |
void | setPermissionsOnly (uint32_t perms) |
void | setUidOnly (size_t uid) |
void | setGidOnly (size_t gid) |
Static Protected Member Functions inherited from File | |
static void | writeCallback (CacheConstants::CallbackCause cause, uintptr_t loc, uintptr_t page, void *meta) |
Protected Attributes inherited from File | |
String | m_Name |
Time::Timestamp | m_AccessedTime |
Time::Timestamp | m_ModifiedTime |
Time::Timestamp | m_CreationTime |
uintptr_t | m_Inode |
class Filesystem * | m_pFilesystem |
size_t | m_Size |
File * | m_pParent |
size_t | m_nWriters |
size_t | m_nReaders |
size_t | m_Uid |
size_t | m_Gid |
uint32_t | m_Permissions |
HashTable< DataCacheKey, uintptr_t > | m_DataCache |
bool | m_bDirect |
Cache | m_FillCache |
Mutex | m_Lock |
List< MonitorTarget * > | m_MonitorTargets |
Definition at line 26 of file PsAuxFile.h.
|
inlineprivatevirtual |
File subclasses can define this and return true if they require read() calls to perform actual data reads, and false if readBlock() is otherwise sufficient.
Reimplemented from File.
Definition at line 62 of file PsAuxFile.h.
|
virtual |
Reads bytes from the file, if isBytewise() == true.
Reimplemented from File.
Definition at line 36 of file PsAuxFile.cc.
References Buffer< T, allowShortOperation >::read().
|
virtual |
Similar to POSIX's select() function
Reimplemented from File.
Definition at line 49 of file PsAuxFile.cc.
References Buffer< T, allowShortOperation >::canRead(), Buffer< T, allowShortOperation >::canWrite(), File::dataChanged(), and Buffer< T, allowShortOperation >::write().
|
virtual |
Writes bytes to the file, if isBytewise() == true.
Reimplemented from File.
Definition at line 42 of file PsAuxFile.cc.