gem5  v22.1.0.0
Public Types | Public Member Functions | Private Attributes | List of all members
gem5::PipeFDEntry Class Reference

Holds the metadata needed to maintain the mappings for file descriptors allocated with the pipe() system calls and its variants. More...

#include <fd_entry.hh>

Inheritance diagram for gem5::PipeFDEntry:
gem5::HBFDEntry gem5::FDEntry gem5::Serializable

Public Types

enum  EndType { read = 0 , write = 1 }
 
- Public Types inherited from gem5::FDEntry
enum  FDClass {
  fd_base , fd_hb , fd_file , fd_pipe ,
  fd_device , fd_socket , fd_null
}
 

Public Member Functions

 PipeFDEntry (int sim_fd, int flags, EndType pipe_end_type, bool close_on_exec=false)
 
 PipeFDEntry (PipeFDEntry const &pipe, bool close_on_exec=false)
 
std::shared_ptr< FDEntryclone () const override
 
EndType getEndType () const
 
int getPipeReadSource () const
 
void setPipeReadSource (int tgt_fd)
 
void setEndType (EndType type)
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
- Public Member Functions inherited from gem5::HBFDEntry
 HBFDEntry (int flags, int sim_fd, bool close_on_exec=false)
 
 HBFDEntry (HBFDEntry const &reg, bool close_on_exec=false)
 
int getFlags () const
 
int getSimFD () const
 
void setFlags (int flags)
 
void setSimFD (int sim_fd)
 
- Public Member Functions inherited from gem5::FDEntry
 FDEntry (bool close_on_exec=false)
 
bool getCOE () const
 
FDClass getClass () const
 
void setCOE (bool close_on_exec)
 
- 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)
 

Private Attributes

int _pipeReadSource
 
EndType _pipeEndType
 

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...
 
- Protected Attributes inherited from gem5::HBFDEntry
int _flags
 
int _simFD
 
- Protected Attributes inherited from gem5::FDEntry
bool _closeOnExec
 
FDClass _class
 

Detailed Description

Holds the metadata needed to maintain the mappings for file descriptors allocated with the pipe() system calls and its variants.

Definition at line 168 of file fd_entry.hh.

Member Enumeration Documentation

◆ EndType

Enumerator
read 
write 

Definition at line 171 of file fd_entry.hh.

Constructor & Destructor Documentation

◆ PipeFDEntry() [1/2]

gem5::PipeFDEntry::PipeFDEntry ( int  sim_fd,
int  flags,
EndType  pipe_end_type,
bool  close_on_exec = false 
)
inline

Definition at line 177 of file fd_entry.hh.

References gem5::FDEntry::_class.

◆ PipeFDEntry() [2/2]

gem5::PipeFDEntry::PipeFDEntry ( PipeFDEntry const &  pipe,
bool  close_on_exec = false 
)
inline

Definition at line 183 of file fd_entry.hh.

References gem5::FDEntry::_class.

Member Function Documentation

◆ clone()

std::shared_ptr<FDEntry> gem5::PipeFDEntry::clone ( ) const
inlineoverridevirtual

Reimplemented from gem5::HBFDEntry.

Definition at line 190 of file fd_entry.hh.

◆ getEndType()

EndType gem5::PipeFDEntry::getEndType ( ) const
inline

Definition at line 195 of file fd_entry.hh.

References _pipeEndType.

◆ getPipeReadSource()

int gem5::PipeFDEntry::getPipeReadSource ( ) const
inline

Definition at line 196 of file fd_entry.hh.

References _pipeReadSource.

◆ serialize()

void gem5::PipeFDEntry::serialize ( CheckpointOut cp) const
overridevirtual

Serialize an object.

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

Parameters
cpCheckpoint state

Reimplemented from gem5::FDEntry.

Definition at line 72 of file fd_entry.cc.

References gem5::FDEntry::_closeOnExec, gem5::HBFDEntry::_flags, and SERIALIZE_SCALAR.

◆ setEndType()

void gem5::PipeFDEntry::setEndType ( EndType  type)
inline

Definition at line 199 of file fd_entry.hh.

References _pipeEndType, and gem5::X86ISA::type.

◆ setPipeReadSource()

void gem5::PipeFDEntry::setPipeReadSource ( int  tgt_fd)
inline

Definition at line 198 of file fd_entry.hh.

References _pipeReadSource.

◆ unserialize()

void gem5::PipeFDEntry::unserialize ( CheckpointIn cp)
overridevirtual

Unserialize an object.

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

Parameters
cpCheckpoint state

Reimplemented from gem5::FDEntry.

Definition at line 80 of file fd_entry.cc.

References gem5::FDEntry::_closeOnExec, gem5::HBFDEntry::_flags, and UNSERIALIZE_SCALAR.

Member Data Documentation

◆ _pipeEndType

EndType gem5::PipeFDEntry::_pipeEndType
private

Definition at line 206 of file fd_entry.hh.

Referenced by getEndType(), and setEndType().

◆ _pipeReadSource

int gem5::PipeFDEntry::_pipeReadSource
private

Definition at line 205 of file fd_entry.hh.

Referenced by getPipeReadSource(), and setPipeReadSource().


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

Generated on Wed Dec 21 2022 10:23:29 for gem5 by doxygen 1.9.1