Go to the documentation of this file.
34 #ifndef __FD_ENTRY_HH__
35 #define __FD_ENTRY_HH__
56 virtual std::shared_ptr<FDEntry>
clone()
const = 0;
77 HBFDEntry(
int flags,
int sim_fd,
bool close_on_exec =
false)
85 std::shared_ptr<FDEntry>
88 return std::make_shared<HBFDEntry>(*
this);
114 uint64_t file_offset,
bool close_on_exec =
false)
115 :
HBFDEntry(flags, sim_fd, close_on_exec),
124 std::shared_ptr<FDEntry>
127 return std::make_shared<FileFDEntry>(*
this);
157 bool close_on_exec =
false)
168 std::shared_ptr<FDEntry>
171 return std::make_shared<PipeFDEntry>(*
this);
196 bool close_on_exec =
false)
205 std::shared_ptr<FDEntry>
208 return std::make_shared<DeviceFDEntry>(*
this);
226 bool close_on_exec =
false)
236 std::shared_ptr<FDEntry>
239 return std::make_shared<SocketFDEntry>(*
this);
247 #endif // __FD_ENTRY_HH__
Holds the metadata needed to maintain the mappings for file descriptors allocated with the pipe() sys...
FileFDEntry(int sim_fd, int flags, std::string const &file_name, uint64_t file_offset, bool close_on_exec=false)
std::shared_ptr< FDEntry > clone() const override
std::shared_ptr< FDEntry > clone() const override
virtual void serialize(CheckpointOut &cp) const
Serialize an object.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
DeviceFDEntry(EmulatedDriver *driver, std::string const &file_name, bool close_on_exec=false)
void setPipeReadSource(int tgt_fd)
EmulatedDriver * getDriver() const
void setFileName(std::string const &file_name)
Basic support for object serialization.
std::shared_ptr< FDEntry > clone() const override
void serialize(CheckpointOut &cp) const override
Serialize an object.
SocketFDEntry(int sim_fd, int domain, int type, int protocol, bool close_on_exec=false)
Holds file descriptors needed to simulate devices opened with pseudo files (commonly with calls to io...
EmulatedDriver is an abstract base class for fake SE-mode device drivers.
void setCOE(bool close_on_exec)
PipeFDEntry(PipeFDEntry const &pipe, bool close_on_exec=false)
std::shared_ptr< FDEntry > clone() const override
void setSimFD(int sim_fd)
void setEndType(EndType type)
FDEntry(bool close_on_exec=false)
virtual void unserialize(CheckpointIn &cp)
Unserialize an object.
virtual std::shared_ptr< FDEntry > clone() const =0
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
uint64_t getFileOffset() const
Holds a single file descriptor mapping and that mapping's data for processes running in syscall emula...
DeviceFDEntry(DeviceFDEntry const &dev, bool close_on_exec=false)
Extends the base class to include a host-backed file descriptor field that records the integer used t...
SocketFDEntry(SocketFDEntry const ®, bool close_on_exec=false)
std::string const & getFileName() const
void serialize(CheckpointOut &cp) const override
Serialize an object.
FileFDEntry(FileFDEntry const ®, bool close_on_exec=false)
Holds file descriptors for host-backed files; host-backed files are files which were opened on the ph...
void setFileOffset(uint64_t f_off)
void serialize(CheckpointOut &cp) const override
Serialize an object.
int getPipeReadSource() const
HBFDEntry(HBFDEntry const ®, bool close_on_exec=false)
std::ostream CheckpointOut
HBFDEntry(int flags, int sim_fd, bool close_on_exec=false)
std::shared_ptr< FDEntry > clone() const override
PipeFDEntry(int sim_fd, int flags, EndType pipe_end_type, bool close_on_exec=false)
std::string const & getFileName() const
EndType getEndType() const
Generated on Wed Sep 30 2020 14:02:14 for gem5 by doxygen 1.8.17