Deleted Added
sdiff udiff text old ( 4075:cc018a738853 ) new ( 4437:b6e304245729 )
full compact
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;

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

205
206 /// Determine if the current event is scheduled
207 bool scheduled() const { return getFlags(Scheduled); }
208
209 /// Schedule the event with the current priority or default priority
210 void schedule(Tick t);
211
212 /// Reschedule the event with the current priority
213 // always parameter means to schedule if not already scheduled
214 void reschedule(Tick t, bool always = false);
215
216 /// Remove the event from the current schedule
217 void deschedule();
218
219 /// Return a C string describing the event. This string should
220 /// *not* be dynamically allocated; just a const char array
221 /// describing the event class.
222 virtual const char *description();

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

398 assert(scheduled());
399
400 clearFlags(Squashed);
401 clearFlags(Scheduled);
402 queue->deschedule(this);
403}
404
405inline void
406Event::reschedule(Tick t, bool always)
407{
408 assert(scheduled() || always);
409
410#if TRACING_ON
411 when_scheduled = curTick;
412#endif
413 _when = t;
414
415 if (scheduled()) {
416 clearFlags(Squashed);
417 queue->reschedule(this);
418 } else {
419 setFlags(Scheduled);
420 queue->schedule(this);
421 }
422}
423
424inline void
425EventQueue::schedule(Event *event)
426{
427 insert(event);
428 if (DTRACE(Event))
429 event->trace("scheduled");

--- 22 unchanged lines hidden ---