Deleted Added
sdiff udiff text old ( 5183:b4decf133fe4 ) new ( 5282:2dba627b6646 )
full compact
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

139
140 public:
141 PageTable *pTable;
142
143 //This id is assigned by m5 and is used to keep process' tlb entries
144 //separated.
145 uint64_t M5_pid;
146
147 private:
148 // file descriptor remapping support
149 static const int MAX_FD = 256; // max legal fd value
150 int fd_map[MAX_FD+1];
151
152 public:
153 // static helper functions to generate file descriptors for constructor
154 static int openInputFile(const std::string &filename);
155 static int openOutputFile(const std::string &filename);
156
157 // override of virtual SimObject method: register statistics
158 virtual void regStats();
159
160 // register a thread context for this process.
161 // returns tc's cpu number (index into threadContexts[])
162 int registerThreadContext(ThreadContext *tc);
163
164
165 void replaceThreadContext(ThreadContext *tc, int tcIndex);
166
167 // map simulator fd sim_fd to target fd tgt_fd
168 void dup_fd(int sim_fd, int tgt_fd);
169
170 // generate new target fd for sim_fd
171 int alloc_fd(int sim_fd);
172
173 // free target fd (e.g., after close)
174 void free_fd(int tgt_fd);
175
176 // look up simulator fd for given target fd
177 int sim_fd(int tgt_fd);
178
179 virtual void syscall(int64_t callnum, ThreadContext *tc) = 0;
180
181 // check if the this addr is on the next available page and allocate it
182 // if it's not we'll panic
183 bool checkAndAllocNextPage(Addr vaddr);
184
185 void serialize(std::ostream &os);
186 void unserialize(Checkpoint *cp, const std::string &section);

--- 91 unchanged lines hidden ---