30 #ifndef __PROCESS_HH__ 31 #define __PROCESS_HH__ 40 #include "arch/registers.hh" 44 #include "config/the_isa.hh" 75 void initState()
override;
80 inline uint64_t
uid() {
return _uid; }
81 inline uint64_t
euid() {
return _euid; }
82 inline uint64_t
gid() {
return _gid; }
83 inline uint64_t
egid() {
return _egid; }
84 inline uint64_t
pid() {
return _pid; }
85 inline uint64_t
ppid() {
return _ppid; }
86 inline uint64_t
pgid() {
return _pgid; }
87 inline void pgid(uint64_t pgid) { _pgid =
pgid; }
88 inline uint64_t
tgid() {
return _tgid; }
90 const char *
progName()
const {
return executable.c_str(); }
109 void regStats()
override;
111 void allocateMem(
Addr vaddr, int64_t size,
bool clobber =
false);
115 bool fixupFault(
Addr vaddr);
122 contextIds.push_back(context_id);
129 void revokeThreadContext(
int context_id);
151 bool map(
Addr vaddr,
Addr paddr,
int size,
bool cacheable =
true);
192 void operator=(
const Loader &) =
delete;
204 virtual Process *load(ProcessParams *params,
210 static Process *tryLoaders(ProcessParams *params,
233 std::string absolutePath(
const std::string &path,
bool host_fs);
243 std::string checkPathRedirect(
const std::string &filename);
276 std::shared_ptr<FDArray>
fds;
291 #endif // __PROCESS_HH__
uint64_t childClearTID
Calls a futex wakeup at the address specified by this pointer when this process exits.
std::unique_ptr< SETranslatingPortProxy > initVirtMem
std::vector< ContextID > contextIds
Stats::Scalar numSyscalls
std::shared_ptr< MemState > memState
ThreadContext is the external interface to all thread state for anything outside of the CPU...
Declaration of Statistics objects.
This is a simple scalar statistic, like a counter.
DrainState
Object drain/handover states.
void assignThreadContext(ContextID context_id)
void serialize(const ThreadContext &tc, CheckpointOut &cp)
Thread context serialization helpers.
std::string tgtCwd
The cwd members are used to track changes to the current working directory for the purpose of executi...
std::vector< std::string > envp
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
This class provides the wrapper interface for the system call implementations which are defined in th...
EmulationPageTable * pTable
::Loader::MemoryImage image
std::ostream CheckpointOut
const char * progName() const
::Loader::MemoryImage interpImage
virtual void syscall(ThreadContext *tc, Fault *fault)
void unserialize(ThreadContext &tc, CheckpointIn &cp)
EmulatedDriver is an abstract base class for fake SE-mode device drivers.
virtual bool mmapGrowsDown() const
Does mmap region grow upward or downward from mmapEnd? Most platforms grow downward, but a few (such as Alpha) grow upward instead, so they can override this method to return false.
std::vector< std::string > argv
This class represents the return value from an emulated system call, including any errno setting...
std::shared_ptr< FaultBase > Fault
Abstract superclass for simulation objects.
::Loader::ObjectFile * objFile
int ContextID
Globally unique thread context ID.
const FlagsType init
This Stat is Initialized.
std::shared_ptr< FDArray > fds
std::vector< EmulatedDriver * > drivers