summaryrefslogtreecommitdiff
path: root/src/mem/ruby/buffers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/ruby/buffers')
-rw-r--r--src/mem/ruby/buffers/MessageBuffer.cc6
-rw-r--r--src/mem/ruby/buffers/MessageBuffer.hh4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mem/ruby/buffers/MessageBuffer.cc b/src/mem/ruby/buffers/MessageBuffer.cc
index 0a7a78e8d..0486f627e 100644
--- a/src/mem/ruby/buffers/MessageBuffer.cc
+++ b/src/mem/ruby/buffers/MessageBuffer.cc
@@ -49,7 +49,7 @@ MessageBuffer::MessageBuffer(const string &name)
m_ordering_set = false;
m_strict_fifo = true;
- m_max_size = -1;
+ m_max_size = 0;
m_randomization = true;
m_size_last_time_size_checked = 0;
m_size_at_cycle_start = 0;
@@ -63,7 +63,7 @@ MessageBuffer::MessageBuffer(const string &name)
m_vnet_id = 0;
}
-int
+unsigned int
MessageBuffer::getSize()
{
if (m_time_last_time_size_checked != m_receiver->curCycle()) {
@@ -79,7 +79,7 @@ MessageBuffer::areNSlotsAvailable(unsigned int n)
{
// fast path when message buffers have infinite size
- if (m_max_size == -1) {
+ if (m_max_size == 0) {
return true;
}
diff --git a/src/mem/ruby/buffers/MessageBuffer.hh b/src/mem/ruby/buffers/MessageBuffer.hh
index b65717e2d..444a7fc30 100644
--- a/src/mem/ruby/buffers/MessageBuffer.hh
+++ b/src/mem/ruby/buffers/MessageBuffer.hh
@@ -134,8 +134,8 @@ class MessageBuffer
m_ordering_set = true;
}
- void resize(int size) { m_max_size = size; }
- int getSize();
+ void resize(unsigned int size) { m_max_size = size; }
+ unsigned int getSize();
void setRandomization(bool random_flag) { m_randomization = random_flag; }
void clear();