stats: cleanup a few small problems in stats
[gem5.git] / src / mem / bus.hh
index 7d476bb65a37bf78f9c954802640bf98d1ce797a..97a65c8a92f4e5f66297a93955ed2a47c3d7b517 100644 (file)
 #include <string>
 #include <set>
 #include <list>
-#include <inttypes.h>
 
-#include "base/range.hh"
 #include "base/hashmap.hh"
+#include "base/range.hh"
 #include "base/range_map.hh"
+#include "base/types.hh"
 #include "mem/mem_object.hh"
 #include "mem/packet.hh"
 #include "mem/port.hh"
 #include "mem/request.hh"
-#include "sim/eventq.hh"
 #include "params/Bus.hh"
+#include "sim/eventq.hh"
 
 class Bus : public MemObject
 {
@@ -119,7 +119,7 @@ class Bus : public MemObject
         // Ask the bus to ask everyone on the bus what their block size is and
         // take the max of it. This might need to be changed a bit if we ever
         // support multiple block sizes.
-        virtual int deviceBlockSize()
+        virtual unsigned deviceBlockSize() const
         { return bus->findBlockSize(id); }
 
     };
@@ -259,7 +259,7 @@ class Bus : public MemObject
      * @param id id of the busport that made the request
      * @return the max of all the sizes
      */
-    int findBlockSize(int id);
+    unsigned findBlockSize(int id);
 
     BusFreeEvent busIdle;
 
@@ -308,8 +308,8 @@ class Bus : public MemObject
     /** Has the user specified their own default responder? */
     bool responderSet;
 
-    int defaultBlockSize;
-    int cachedBlockSize;
+    unsigned defaultBlockSize;
+    unsigned cachedBlockSize;
     bool cachedBlockSizeValid;
 
    // Cache for the peer port interfaces
@@ -364,7 +364,7 @@ class Bus : public MemObject
 
     /** A function used to return the port associated with this bus object. */
     virtual Port *getPort(const std::string &if_name, int idx = -1);
-    virtual bool deletePort(Port *p);
+    virtual void deletePortRefs(Port *p);
 
     virtual void init();
     virtual void startup();