1/* 2 * Copyright (c) 2000-2005 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; --- 32 unchanged lines hidden (view full) --- 41#include <algorithm> 42#include <map> 43#include <string> 44#include <vector> 45 46#include "sim/host.hh" // for Tick 47 48#include "base/fast_alloc.hh" |
49#include "base/misc.hh" |
50#include "base/trace.hh" 51#include "sim/serialize.hh" 52 53class EventQueue; // forward declaration 54 55////////////////////// 56// 57// Main Event Queue --- 73 unchanged lines hidden (view full) --- 131 132 /// Default is zero for historical reasons. 133 Default_Pri = 0, 134 135 /// CPU switches schedule the new CPU's tick event for the 136 /// same cycle (after unscheduling the old CPU's tick event). 137 /// The switch needs to come before any tick events to make 138 /// sure we don't tick both CPUs in the same cycle. |
139 CPU_Switch_Pri = -31, |
140 141 /// Serailization needs to occur before tick events also, so 142 /// that a serialize/unserialize is identical to an on-line 143 /// CPU switch. 144 Serialize_Pri = 32, 145 146 /// CPU ticks must come after other associated CPU events 147 /// (such as writebacks). --- 199 unchanged lines hidden (view full) --- 347////////////////////// 348 349// schedule at specified time (place on event queue specified via 350// constructor) 351inline void 352Event::schedule(Tick t) 353{ 354 assert(!scheduled()); |
355// if (t < curTick) 356// warn("t is less than curTick, ensure you don't want cycles"); |
357 358 setFlags(Scheduled); 359#if TRACING_ON 360 when_scheduled = curTick; 361#endif 362 _when = t; 363 queue->schedule(this); 364} --- 52 unchanged lines hidden --- |