sim: typecast Tick to UTick for eventQ assert
authorKorey Sewell <ksewell@umich.edu>
Tue, 29 Mar 2011 23:36:36 +0000 (19:36 -0400)
committerKorey Sewell <ksewell@umich.edu>
Tue, 29 Mar 2011 23:36:36 +0000 (19:36 -0400)
src/sim/eventq.hh

index e28c43bb774b8630bb68d470f0dbbe6dc13d7300..8fbd1b2b16753a7ecff93cb0552b46a4bf261b10 100644 (file)
@@ -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());