summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-08-21 05:49:09 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-08-21 05:49:09 -0400
commit016593f2e91564dc9d675ae42dfd37059f9b5589 (patch)
tree9eed2d90618a4eccbd6b3c743c4d7545bfb935dd /src/sim
parent452217817f421a64bc022a5977e795229af45b30 (diff)
downloadgem5-016593f2e91564dc9d675ae42dfd37059f9b5589.tar.xz
Clock: Make Tick unsigned and remove UTick
This patch makes the Tick unsigned and removes the UTick typedef. The ticks should never be negative, and there was only one major issue with removing it, caused by the o3 CPU using a -1 as an initial value. The patch has no impact on any regressions.
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/eventq.hh8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/sim/eventq.hh b/src/sim/eventq.hh
index 09483f4e2..c46902889 100644
--- a/src/sim/eventq.hh
+++ b/src/sim/eventq.hh
@@ -481,9 +481,7 @@ class EventManager
inline void
EventQueue::schedule(Event *event, Tick when)
{
- // Typecasting Tick->Utick here since gcc
- // complains about signed overflow
- assert((UTick)when >= (UTick)curTick());
+ assert(when >= curTick());
assert(!event->scheduled());
assert(event->initialized());
@@ -520,9 +518,7 @@ EventQueue::deschedule(Event *event)
inline void
EventQueue::reschedule(Event *event, Tick when, bool always)
{
- // Typecasting Tick->Utick here since gcc
- // complains about signed overflow
- assert((UTick)when >= (UTick)curTick());
+ assert(when >= curTick());
assert(always || event->scheduled());
assert(event->initialized());