gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
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 PipeFDEntry:
HBFDEntry FDEntry Serializable

Public Types

enum  EndType { read = 0, write = 1 }
 

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 HBFDEntry
 HBFDEntry (int flags, int sim_fd, 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 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

int _pipeReadSource
 
EndType _pipeEndType
 

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 HBFDEntry
int _flags
 
int _simFD
 
- Protected Attributes inherited from FDEntry
bool _closeOnExec
 

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 140 of file fd_entry.hh.

Member Enumeration Documentation

Enumerator
read 
write 

Definition at line 143 of file fd_entry.hh.

Constructor & Destructor Documentation

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

Definition at line 148 of file fd_entry.hh.

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

Definition at line 154 of file fd_entry.hh.

Member Function Documentation

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

Implements FDEntry.

Definition at line 161 of file fd_entry.hh.

EndType PipeFDEntry::getEndType ( ) const
inline

Definition at line 166 of file fd_entry.hh.

References _pipeEndType.

int PipeFDEntry::getPipeReadSource ( ) const
inline

Definition at line 167 of file fd_entry.hh.

References _pipeReadSource.

void PipeFDEntry::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 71 of file fd_entry.cc.

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

void PipeFDEntry::setEndType ( EndType  type)
inline

Definition at line 170 of file fd_entry.hh.

References _pipeEndType, and X86ISA::type.

void PipeFDEntry::setPipeReadSource ( int  tgt_fd)
inline

Definition at line 169 of file fd_entry.hh.

References _pipeReadSource.

void PipeFDEntry::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 79 of file fd_entry.cc.

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

Member Data Documentation

EndType PipeFDEntry::_pipeEndType
private

Definition at line 177 of file fd_entry.hh.

Referenced by getEndType(), and setEndType().

int PipeFDEntry::_pipeReadSource
private

Definition at line 176 of file fd_entry.hh.

Referenced by getPipeReadSource(), and setPipeReadSource().


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

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