From 6487d358a4588779bdae72e842380a50c780bf82 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Wed, 20 Dec 2006 21:46:16 -0800 Subject: Make sure that variables are always initalized! --HG-- extra : convert_revision : 1e946d9b1e1def36f9b8a73986dabf1b77096327 --- src/cpu/o3/cpu.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/cpu/o3') diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc index a5a00015f..18cc87c0b 100644 --- a/src/cpu/o3/cpu.cc +++ b/src/cpu/o3/cpu.cc @@ -117,17 +117,18 @@ FullO3CPU::ActivateThreadEvent::description() template FullO3CPU::DeallocateContextEvent::DeallocateContextEvent() - : Event(&mainEventQueue, CPU_Tick_Pri) + : Event(&mainEventQueue, CPU_Tick_Pri), tid(0), remove(false), cpu(NULL) { } template void FullO3CPU::DeallocateContextEvent::init(int thread_num, - FullO3CPU *thread_cpu) + FullO3CPU *thread_cpu) { tid = thread_num; cpu = thread_cpu; + remove = false; } template @@ -606,7 +607,8 @@ FullO3CPU::suspendContext(int tid) DPRINTF(O3CPU,"[tid: %i]: Suspending Thread Context.\n", tid); bool deallocated = deallocateContext(tid, false, 1); // If this was the last thread then unschedule the tick event. - if ((activeThreads.size() == 1 && !deallocated) || activeThreads.size() == 0) + if (activeThreads.size() == 1 && !deallocated || + activeThreads.size() == 0) unscheduleTickEvent(); _status = Idle; } -- cgit v1.2.3