gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
DeviceFDEntry Class Reference

Holds file descriptors needed to simulate devices opened with pseudo files (commonly with calls to ioctls). More...

#include <fd_entry.hh>

Inheritance diagram for DeviceFDEntry:
FDEntry Serializable

Public Member Functions

 DeviceFDEntry (EmulatedDriver *driver, std::string const &file_name, bool close_on_exec=false)
 
 DeviceFDEntry (DeviceFDEntry const &dev, bool close_on_exec=false)
 
std::shared_ptr< FDEntryclone () const override
 
EmulatedDrivergetDriver () const
 
std::string getFileName () const
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
- Public Member Functions inherited from FDEntry
 FDEntry (bool close_on_exec=false)
 
bool getCOE () const
 
void setCOE (bool close_on_exec)
 
- Public Member Functions inherited from Serializable
 Serializable ()
 
virtual ~Serializable ()
 
void serializeSection (CheckpointOut &cp, const char *name) const
 Serialize an object into a new section. More...
 
void serializeSection (CheckpointOut &cp, const std::string &name) const
 
void unserializeSection (CheckpointIn &cp, const char *name)
 Unserialize an a child object. More...
 
void unserializeSection (CheckpointIn &cp, const std::string &name)
 

Private Attributes

EmulatedDriver_driver
 
std::string _fileName
 

Additional Inherited Members

- Static Public Member Functions inherited from Serializable
static const std::string & currentSection ()
 Get the fully-qualified name of the active section. More...
 
static void serializeAll (const std::string &cpt_dir)
 
static void unserializeGlobals (CheckpointIn &cp)
 
- Static Public Attributes inherited from Serializable
static int ckptCount = 0
 
static int ckptMaxCount = 0
 
static int ckptPrevCount = -1
 
- Protected Attributes inherited from FDEntry
bool _closeOnExec
 

Detailed Description

Holds file descriptors needed to simulate devices opened with pseudo files (commonly with calls to ioctls).

Definition at line 184 of file fd_entry.hh.

Constructor & Destructor Documentation

DeviceFDEntry::DeviceFDEntry ( EmulatedDriver driver,
std::string const &  file_name,
bool  close_on_exec = false 
)
inline

Definition at line 187 of file fd_entry.hh.

DeviceFDEntry::DeviceFDEntry ( DeviceFDEntry const &  dev,
bool  close_on_exec = false 
)
inline

Definition at line 192 of file fd_entry.hh.

Member Function Documentation

std::shared_ptr<FDEntry> DeviceFDEntry::clone ( ) const
inlineoverridevirtual

Implements FDEntry.

Definition at line 198 of file fd_entry.hh.

EmulatedDriver* DeviceFDEntry::getDriver ( ) const
inline

Definition at line 203 of file fd_entry.hh.

References _driver.

std::string DeviceFDEntry::getFileName ( ) const
inline

Definition at line 204 of file fd_entry.hh.

References _fileName.

void DeviceFDEntry::serialize ( CheckpointOut cp) const
overridevirtual

Serialize an object.

Output an object's state into the current checkpoint section.

Parameters
cpCheckpoint state

Reimplemented from FDEntry.

Definition at line 87 of file fd_entry.cc.

References FDEntry::_closeOnExec, _fileName, and SERIALIZE_SCALAR.

void DeviceFDEntry::unserialize ( CheckpointIn cp)
overridevirtual

Unserialize an object.

Read an object's state from the current checkpoint section.

Parameters
cpCheckpoint state

Reimplemented from FDEntry.

Definition at line 95 of file fd_entry.cc.

References FDEntry::_closeOnExec, _fileName, and UNSERIALIZE_SCALAR.

Member Data Documentation

EmulatedDriver* DeviceFDEntry::_driver
private

Definition at line 210 of file fd_entry.hh.

Referenced by getDriver().

std::string DeviceFDEntry::_fileName
private

Definition at line 211 of file fd_entry.hh.

Referenced by getFileName(), serialize(), and unserialize().


The documentation for this class was generated from the following files:

Generated on Fri Jun 9 2017 13:04:07 for gem5 by doxygen 1.8.6