syscall emulation: Enabled getrlimit and getrusage for x86.
[gem5.git] / src / arch / mips / process.hh
index 45513af46fa3c7b791288713d8943e21237192fb..3f9a7aff0326fc3513966cb4dda6fc7553b232bd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003-2004 The Regents of The University of Michigan
+ * Copyright (c) 2006 The Regents of The University of Michigan
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -34,6 +34,7 @@
 
 #include <string>
 #include <vector>
+
 #include "sim/process.hh"
 
 class LiveProcess;
@@ -43,24 +44,17 @@ class System;
 class MipsLiveProcess : public LiveProcess
 {
   protected:
-    MipsLiveProcess(const std::string &nm, ObjectFile *objFile,
-                System *_system, int stdin_fd, int stdout_fd, int stderr_fd,
-                std::vector<std::string> &argv,
-                std::vector<std::string> &envp);
+    MipsLiveProcess(LiveProcessParams * params, ObjectFile *objFile);
 
-    void startup();
+    void initState();
 
-  public:
-    // this function is used to create the LiveProcess object, since
-    // we can't tell which subclass of LiveProcess to use until we
-    // open and look at the object file.
-    static MipsLiveProcess *create(const std::string &nm,
-                               System *_system,
-                               int stdin_fd, int stdout_fd, int stderr_fd,
-                               std::string executable,
-                               std::vector<std::string> &argv,
-                               std::vector<std::string> &envp);
+    template<class IntType>
+    void argsInit(int pageSize);
 
+  public:
+    MipsISA::IntReg getSyscallArg(ThreadContext *tc, int &i);
+    void setSyscallArg(ThreadContext *tc, int i, MipsISA::IntReg val);
+    void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value);
 };