Deleted Added
sdiff udiff text old ( 10913:38dbdeea7f1f ) new ( 10929:b2bbfec74eca )
full compact
1/*
2 * Copyright (c) 2014 Advanced Micro Devices, Inc.
3 * Copyright (c) 2001-2005 The Regents of The University of Michigan
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 147 unchanged lines hidden (view full) ---

156 void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE;
157 };
158
159 protected:
160 /// Memory proxy for initialization (image loading)
161 SETranslatingPortProxy initVirtMem;
162
163 private:
164 // file descriptor remapping support
165 static const int MAX_FD = 256; // max legal fd value
166 FdMap fd_map[MAX_FD+1];
167
168
169 public:
170 // static helper functions to generate file descriptors for constructor
171 static int openInputFile(const std::string &filename);
172 static int openOutputFile(const std::string &filename);
173
174 // override of virtual SimObject method: register statistics
175 virtual void regStats();

--- 6 unchanged lines hidden (view full) ---

182 }
183
184 // Find a free context to use
185 ThreadContext *findFreeContext();
186
187 // provide program name for debug messages
188 virtual const char *progName() const { return "<unknown>"; }
189
190 // map simulator fd sim_fd to target fd tgt_fd
191 void dup_fd(int sim_fd, int tgt_fd);
192
193 // generate new target fd for sim_fd
194 int alloc_fd(int sim_fd, const std::string& filename, int flags, int mode,
195 bool pipe);
196
197 // free target fd (e.g., after close)
198 void free_fd(int tgt_fd);
199
200 // look up simulator fd for given target fd
201 int sim_fd(int tgt_fd);
202
203 // look up simulator fd_map object for a given target fd
204 FdMap *sim_fd_obj(int tgt_fd);
205
206 // fix all offsets for currently open files and save them
207 void fix_file_offsets();
208
209 // find all offsets for currently open files and save them
210 void find_file_offsets();
211
212 // set the source of this read pipe for a checkpoint resume
213 void setReadPipeSource(int read_pipe_fd, int source_fd);

--- 140 unchanged lines hidden ---