summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2011-03-29 19:36:36 -0400
committerKorey Sewell <ksewell@umich.edu>2011-03-29 19:36:36 -0400
commit473bc2197755bce925083a3d20ad0a1b4ef2e3fe (patch)
treeefe3f0690d34d4bb0115f241004d6af5ff31d8a0 /src
parentccc8ba20331dea690181729872486b57067ff9fa (diff)
downloadgem5-473bc2197755bce925083a3d20ad0a1b4ef2e3fe.tar.xz
sim: typecast Tick to UTick for eventQ assert
Diffstat (limited to 'src')
-rw-r--r--src/sim/eventq.hh6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sim/eventq.hh b/src/sim/eventq.hh
index e28c43bb7..8fbd1b2b1 100644
--- a/src/sim/eventq.hh
+++ b/src/sim/eventq.hh
@@ -486,6 +486,8 @@ 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(!event->scheduled());
assert(event->initialized());
@@ -523,7 +525,9 @@ EventQueue::deschedule(Event *event)
inline void
EventQueue::reschedule(Event *event, Tick when, bool always)
{
- assert(when >= curTick());
+ // Typecasting Tick->Utick here since gcc
+ // complains about signed overflow
+ assert((UTick)when >= (UTick)curTick());
assert(always || event->scheduled());
assert(event->initialized());