eventq.hh (4075:cc018a738853) eventq.hh (4437:b6e304245729)
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
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 void reschedule(Tick t);
213 // always parameter means to schedule if not already scheduled
214 void reschedule(Tick t, bool always = false);
214
215 /// Remove the event from the current schedule
216 void deschedule();
217
218 /// Return a C string describing the event. This string should
219 /// *not* be dynamically allocated; just a const char array
220 /// describing the event class.
221 virtual const char *description();

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

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

--- 22 unchanged lines hidden ---
422}
423
424inline void
425EventQueue::schedule(Event *event)
426{
427 insert(event);
428 if (DTRACE(Event))
429 event->trace("scheduled");

--- 22 unchanged lines hidden ---