Deleted Added
sdiff udiff text old ( 5543:3af77710f397 ) new ( 5713:993c7952b930 )
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;

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

72 // have we initialized a thread context from this process? If
73 // yes, subsequent contexts are assumed to be for dynamically
74 // created threads and are not initialized.
75 bool initialContextLoaded;
76
77 bool checkpointRestored;
78
79 // thread contexts associated with this process
80 std::vector<int> contextIds;
81
82 // remote gdb objects
83 std::vector<TheISA::RemoteGDB *> remoteGDB;
84 std::vector<GDBListener *> gdbListen;
85 bool breakpoint();
86
87 // number of CPUs (esxec contexts, really) assigned to this process.
88 unsigned int numCpus() { return contextIds.size(); }
89
90 // record of blocked context
91 struct WaitRec
92 {
93 Addr waitChan;
94 ThreadContext *waitingContext;
95
96 WaitRec(Addr chan, ThreadContext *ctx)

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

182 public:
183 // static helper functions to generate file descriptors for constructor
184 static int openInputFile(const std::string &filename);
185 static int openOutputFile(const std::string &filename);
186
187 // override of virtual SimObject method: register statistics
188 virtual void regStats();
189
190 // After getting registered with system object, tell process which
191 // system-wide context id it is assigned.
192 void assignThreadContext(int context_id)
193 {
194 contextIds.push_back(context_id);
195 }
196
197 // Find a free context to use
198 ThreadContext * findFreeContext();
199
200 // map simulator fd sim_fd to target fd tgt_fd
201 void dup_fd(int sim_fd, int tgt_fd);
202
203 // generate new target fd for sim_fd
204 int alloc_fd(int sim_fd, std::string filename, int flags, int mode, bool pipe);
205
206 // free target fd (e.g., after close)
207 void free_fd(int tgt_fd);

--- 117 unchanged lines hidden ---