gem5  v21.1.0.2
Public Types | Public Member Functions | Protected Attributes | List of all members
gem5::FDEntry Class Referenceabstract

Holds a single file descriptor mapping and that mapping's data for processes running in syscall emulation mode. More...

#include <fd_entry.hh>

Inheritance diagram for gem5::FDEntry:
gem5::Serializable gem5::DeviceFDEntry gem5::HBFDEntry gem5::FileFDEntry gem5::PipeFDEntry gem5::SocketFDEntry

Public Types

enum  FDClass {
  fd_base, fd_hb, fd_file, fd_pipe,
  fd_device, fd_socket, fd_null
}
 

Public Member Functions

 FDEntry (bool close_on_exec=false)
 
virtual std::shared_ptr< FDEntryclone () const =0
 
bool getCOE () const
 
FDClass getClass () const
 
void setCOE (bool close_on_exec)
 
virtual void serialize (CheckpointOut &cp) const
 Serialize an object. More...
 
virtual void unserialize (CheckpointIn &cp)
 Unserialize an object. More...
 
- Public Member Functions inherited from gem5::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)
 

Protected Attributes

bool _closeOnExec
 
FDClass _class
 

Additional Inherited Members

- Static Public Member Functions inherited from gem5::Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section. More...
 
static void generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream)
 Generate a checkpoint file so that the serialization can be routed to it. More...
 

Detailed Description

Holds a single file descriptor mapping and that mapping's data for processes running in syscall emulation mode.

Definition at line 53 of file fd_entry.hh.

Member Enumeration Documentation

◆ FDClass

Enumerator
fd_base 
fd_hb 
fd_file 
fd_pipe 
fd_device 
fd_socket 
fd_null 

Definition at line 57 of file fd_entry.hh.

Constructor & Destructor Documentation

◆ FDEntry()

gem5::FDEntry::FDEntry ( bool  close_on_exec = false)
inline

Definition at line 68 of file fd_entry.hh.

References _class.

Member Function Documentation

◆ clone()

virtual std::shared_ptr<FDEntry> gem5::FDEntry::clone ( ) const
pure virtual

◆ getClass()

FDClass gem5::FDEntry::getClass ( ) const
inline

Definition at line 76 of file fd_entry.hh.

References _class.

◆ getCOE()

bool gem5::FDEntry::getCOE ( ) const
inline

Definition at line 74 of file fd_entry.hh.

References _closeOnExec.

◆ serialize()

void gem5::FDEntry::serialize ( CheckpointOut cp) const
virtual

Serialize an object.

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

Parameters
cpCheckpoint state

Implements gem5::Serializable.

Reimplemented in gem5::DeviceFDEntry, gem5::PipeFDEntry, and gem5::FileFDEntry.

Definition at line 42 of file fd_entry.cc.

References _closeOnExec, and SERIALIZE_SCALAR.

◆ setCOE()

void gem5::FDEntry::setCOE ( bool  close_on_exec)
inline

Definition at line 78 of file fd_entry.hh.

References _closeOnExec.

◆ unserialize()

void gem5::FDEntry::unserialize ( CheckpointIn cp)
virtual

Unserialize an object.

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

Parameters
cpCheckpoint state

Implements gem5::Serializable.

Reimplemented in gem5::DeviceFDEntry, gem5::PipeFDEntry, and gem5::FileFDEntry.

Definition at line 48 of file fd_entry.cc.

References _closeOnExec, and UNSERIALIZE_SCALAR.

Member Data Documentation

◆ _class

FDClass gem5::FDEntry::_class
protected

◆ _closeOnExec

bool gem5::FDEntry::_closeOnExec
protected

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

Generated on Tue Sep 21 2021 12:27:35 for gem5 by doxygen 1.8.17