cpu.cc (10407:a9023811bf9e) | cpu.cc (10408:a59c189de383) |
---|---|
1/* 2 * Copyright (c) 2011-2012, 2014 ARM Limited 3 * Copyright (c) 2013 Advanced Micro Devices, Inc. 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 716 unchanged lines hidden (view full) --- 725 lastActivatedCycle = curTick(); 726 727 _status = Running; 728 } 729} 730 731template <class Impl> 732void | 1/* 2 * Copyright (c) 2011-2012, 2014 ARM Limited 3 * Copyright (c) 2013 Advanced Micro Devices, Inc. 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 716 unchanged lines hidden (view full) --- 725 lastActivatedCycle = curTick(); 726 727 _status = Running; 728 } 729} 730 731template <class Impl> 732void |
733FullO3CPU<Impl>::deallocateContext(ThreadID tid, bool remove) 734{ 735 deactivateThread(tid); 736 if (remove) 737 removeThread(tid); 738} 739 740template <class Impl> 741void | |
742FullO3CPU<Impl>::suspendContext(ThreadID tid) 743{ 744 DPRINTF(O3CPU,"[tid: %i]: Suspending Thread Context.\n", tid); 745 assert(!switchedOut()); | 733FullO3CPU<Impl>::suspendContext(ThreadID tid) 734{ 735 DPRINTF(O3CPU,"[tid: %i]: Suspending Thread Context.\n", tid); 736 assert(!switchedOut()); |
746 deallocateContext(tid, false); | |
747 | 737 |
738 deactivateThread(tid); 739 |
|
748 // If this was the last thread then unschedule the tick event. 749 if (activeThreads.size() == 0) 750 unscheduleTickEvent(); 751 752 DPRINTF(Quiesce, "Suspending Context\n"); 753 lastRunningCycle = curCycle(); 754 _status = Idle; 755} 756 757template <class Impl> 758void 759FullO3CPU<Impl>::haltContext(ThreadID tid) 760{ 761 //For now, this is the same as deallocate 762 DPRINTF(O3CPU,"[tid:%i]: Halt Context called. Deallocating", tid); 763 assert(!switchedOut()); | 740 // If this was the last thread then unschedule the tick event. 741 if (activeThreads.size() == 0) 742 unscheduleTickEvent(); 743 744 DPRINTF(Quiesce, "Suspending Context\n"); 745 lastRunningCycle = curCycle(); 746 _status = Idle; 747} 748 749template <class Impl> 750void 751FullO3CPU<Impl>::haltContext(ThreadID tid) 752{ 753 //For now, this is the same as deallocate 754 DPRINTF(O3CPU,"[tid:%i]: Halt Context called. Deallocating", tid); 755 assert(!switchedOut()); |
764 deallocateContext(tid, true); | 756 757 deactivateThread(tid); 758 removeThread(tid); |
765} 766 767template <class Impl> 768void 769FullO3CPU<Impl>::insertThread(ThreadID tid) 770{ 771 DPRINTF(O3CPU,"[tid:%i] Initializing thread into CPU"); 772 // Will change now that the PC and thread state is internal to the CPU --- 911 unchanged lines hidden --- | 759} 760 761template <class Impl> 762void 763FullO3CPU<Impl>::insertThread(ThreadID tid) 764{ 765 DPRINTF(O3CPU,"[tid:%i] Initializing thread into CPU"); 766 // Will change now that the PC and thread state is internal to the CPU --- 911 unchanged lines hidden --- |