Deleted Added
sdiff udiff text old ( 9608:e2b6b86fda03 ) new ( 9830:5995f4d33a11 )
full compact
1/*
2 * Copyright (c) 2012-2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

315 *
316 * We need to drain if:
317 * <ul>
318 * <li>We are in the middle of a microcode sequence as some CPUs
319 * (e.g., HW accelerated CPUs) can't be started in the middle
320 * of a gem5 microcode sequence.
321 *
322 * <li>Stay at PC is true.
323 *
324 * <li>A fetch event is scheduled. Normally this would never be the
325 case with microPC() == 0, but right after a context is
326 activated it can happen.
327 * </ul>
328 */
329 bool isDrained() {
330 return microPC() == 0 && !stayAtPC && !fetchEvent.scheduled();
331 }
332
333 /**
334 * Try to complete a drain request.
335 *
336 * @returns true if the CPU is drained, false otherwise.
337 */
338 bool tryCompleteDrain();
339
340 /**
341 * Drain manager to use when signaling drain completion
342 *
343 * This pointer is non-NULL when draining and NULL otherwise.
344 */
345 DrainManager *drainManager;
346};
347
348#endif // __CPU_SIMPLE_TIMING_HH__