cpu.cc (3965:b4cab77371ed) | cpu.cc (3970:d54945bab95d) |
---|---|
1/* 2 * Copyright (c) 2004-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 103 unchanged lines hidden (view full) --- 112const char * 113FullO3CPU<Impl>::ActivateThreadEvent::description() 114{ 115 return "FullO3CPU \"Activate Thread\" event"; 116} 117 118template <class Impl> 119FullO3CPU<Impl>::DeallocateContextEvent::DeallocateContextEvent() | 1/* 2 * Copyright (c) 2004-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 103 unchanged lines hidden (view full) --- 112const char * 113FullO3CPU<Impl>::ActivateThreadEvent::description() 114{ 115 return "FullO3CPU \"Activate Thread\" event"; 116} 117 118template <class Impl> 119FullO3CPU<Impl>::DeallocateContextEvent::DeallocateContextEvent() |
120 : Event(&mainEventQueue, CPU_Tick_Pri) | 120 : Event(&mainEventQueue, CPU_Tick_Pri), tid(0), remove(false), cpu(NULL) |
121{ 122} 123 124template <class Impl> 125void 126FullO3CPU<Impl>::DeallocateContextEvent::init(int thread_num, | 121{ 122} 123 124template <class Impl> 125void 126FullO3CPU<Impl>::DeallocateContextEvent::init(int thread_num, |
127 FullO3CPU | 127 FullO3CPU<Impl> *thread_cpu) |
128{ 129 tid = thread_num; 130 cpu = thread_cpu; | 128{ 129 tid = thread_num; 130 cpu = thread_cpu; |
131 remove = false; |
|
131} 132 133template <class Impl> 134void 135FullO3CPU<Impl>::DeallocateContextEvent::process() 136{ 137 cpu->deactivateThread(tid); 138 if (remove) --- 466 unchanged lines hidden (view full) --- 605 606template <class Impl> 607void 608FullO3CPU<Impl>::suspendContext(int tid) 609{ 610 DPRINTF(O3CPU,"[tid: %i]: Suspending Thread Context.\n", tid); 611 bool deallocated = deallocateContext(tid, false, 1); 612 // If this was the last thread then unschedule the tick event. | 132} 133 134template <class Impl> 135void 136FullO3CPU<Impl>::DeallocateContextEvent::process() 137{ 138 cpu->deactivateThread(tid); 139 if (remove) --- 466 unchanged lines hidden (view full) --- 606 607template <class Impl> 608void 609FullO3CPU<Impl>::suspendContext(int tid) 610{ 611 DPRINTF(O3CPU,"[tid: %i]: Suspending Thread Context.\n", tid); 612 bool deallocated = deallocateContext(tid, false, 1); 613 // If this was the last thread then unschedule the tick event. |
613 if ((activeThreads.size() == 1 && !deallocated) || activeThreads.size() == 0) | 614 if (activeThreads.size() == 1 && !deallocated || 615 activeThreads.size() == 0) |
614 unscheduleTickEvent(); 615 _status = Idle; 616} 617 618template <class Impl> 619void 620FullO3CPU<Impl>::haltContext(int tid) 621{ --- 840 unchanged lines hidden --- | 616 unscheduleTickEvent(); 617 _status = Idle; 618} 619 620template <class Impl> 621void 622FullO3CPU<Impl>::haltContext(int tid) 623{ --- 840 unchanged lines hidden --- |