cpu: remove unnecessary data ptr from O3 internal read() funcs
[gem5.git] / src / sim / system.hh
index 97d271d3aa1aa1269317f96071c3c203f7ad4f47..c67f702190a513d289ab25bd38c6e7a048afcacc 100644 (file)
@@ -97,9 +97,9 @@ class System : public MemObject
         SystemPort(const std::string &_name, MemObject *_owner)
             : MasterPort(_name, _owner)
         { }
-        bool recvTimingResp(PacketPtr pkt)
+        bool recvTimingResp(PacketPtr pkt) override
         { panic("SystemPort does not receive timing!\n"); return false; }
-        void recvReqRetry()
+        void recvReqRetry() override
         { panic("SystemPort does not expect retry!\n"); }
     };
 
@@ -111,7 +111,7 @@ class System : public MemObject
      * After all objects have been created and all ports are
      * connected, check that the system port is connected.
      */
-    virtual void init();
+    void init() override;
 
     /**
      * Get a reference to the system port that can be used by
@@ -127,7 +127,7 @@ class System : public MemObject
      * Additional function to return the Port of a memory object.
      */
     BaseMasterPort& getMasterPort(const std::string &if_name,
-                                  PortID idx = InvalidPortID);
+                                  PortID idx = InvalidPortID) override;
 
     /** @{ */
     /**
@@ -196,8 +196,9 @@ class System : public MemObject
 
     std::vector<ThreadContext *> threadContexts;
     int _numContexts;
+    const bool multiThread;
 
-    ThreadContext *getThreadContext(ThreadID tid)
+    ThreadContext *getThreadContext(ContextID tid)
     {
         return threadContexts[tid];
     }
@@ -334,7 +335,7 @@ class System : public MemObject
         return masterIds.size();
     }
 
-    virtual void regStats();
+    void regStats() override;
     /**
      * Called by pseudo_inst to track the number of work items started by this
      * system.
@@ -486,7 +487,7 @@ class System : public MemObject
     System(Params *p);
     ~System();
 
-    void initState();
+    void initState() override;
 
     const Params *params() const { return (const Params *)_params; }
 
@@ -514,13 +515,14 @@ class System : public MemObject
     /// @return Starting address of first page
     Addr allocPhysPages(int npages);
 
-    int registerThreadContext(ThreadContext *tc, int assigned=-1);
-    void replaceThreadContext(ThreadContext *tc, int context_id);
+    ContextID registerThreadContext(ThreadContext *tc,
+                                    ContextID assigned = InvalidContextID);
+    void replaceThreadContext(ThreadContext *tc, ContextID context_id);
 
-    void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE;
-    void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE;
+    void serialize(CheckpointOut &cp) const override;
+    void unserialize(CheckpointIn &cp) override;
 
-    void drainResume() M5_ATTR_OVERRIDE;
+    void drainResume() override;
 
   public:
     Counter totalNumInsts;