Deleted Added
sdiff udiff text old ( 12127:4207df055b0d ) new ( 12276:22c220be30c5 )
full compact
1/*
2 * Copyright 2014 Google, Inc.
3 * Copyright (c) 2012-2013,2015 ARM Limited
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
9 * to a hardware implementation of the functionality of the software
10 * licensed hereunder. You may use the software subject to the license
11 * terms below provided that you ensure that this notice is replicated

--- 84 unchanged lines hidden (view full) ---

96 if (tickEvent.scheduled()) {
97 deschedule(tickEvent);
98 }
99}
100
101DrainState
102AtomicSimpleCPU::drain()
103{
104 if (switchedOut())
105 return DrainState::Drained;
106
107 if (!isDrained()) {
108 DPRINTF(Drain, "Requesting drain.\n");
109 return DrainState::Draining;
110 } else {
111 if (tickEvent.scheduled())

--- 46 unchanged lines hidden (view full) ---

158 // Tick if any threads active
159 if (!tickEvent.scheduled()) {
160 schedule(tickEvent, nextCycle());
161 }
162 } else {
163 threadInfo[tid]->notIdleFraction = 0;
164 }
165 }
166}
167
168bool
169AtomicSimpleCPU::tryCompleteDrain()
170{
171 if (drainState() != DrainState::Draining)
172 return false;
173

--- 525 unchanged lines hidden ---