35a36
> #include <array>
43a45
> #include "sim/fd_entry.hh"
138,158d139
< class FdMap : public Serializable
< {
< public:
< int fd;
< std::string filename;
< int mode;
< int flags;
< bool isPipe;
< int readPipeSource;
< uint64_t fileOffset;
< EmulatedDriver *driver;
<
< FdMap()
< : fd(-1), filename("NULL"), mode(0), flags(0),
< isPipe(false), readPipeSource(0), fileOffset(0), driver(NULL)
< { }
<
< void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE;
< void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE;
< };
<
167c148
< FdMap *fd_map;
---
> std::shared_ptr<std::array<FDEntry, NUM_FDS>> fd_array;
168a150,153
> // Standard file descriptor options for initialization and checkpoints.
> std::map<std::string, int> imap;
> std::map<std::string, int> oemap;
>
170,172c155,156
< // static helper functions to generate file descriptors for constructor
< static int openInputFile(const std::string &filename);
< static int openOutputFile(const std::string &filename);
---
> // inherit file descriptor map from another process (necessary for clone)
> void inheritFdArray(Process *p);
195c179
< void free_fdmap_entry(int tgt_fd);
---
> void reset_fd_entry(int tgt_fd);
200,201c184,185
< // look up simulator fd_map object for a given target fd
< FdMap *sim_fd_obj(int tgt_fd);
---
> // look up fd entry for a given target fd
> FDEntry *get_fd_entry(int tgt_fd);