Deleted Added
sdiff udiff text old ( 9983:2cce74fe359e ) new ( 12040:8cd9d09aac7a )
full compact
1/*
2 * Copyright (c) 2012 The Regents of The University of Michigan
3 * Copyright (c) 2012-2013 Mark D. Hill and David A. Wood
4 * Copyright (c) 2013 Advanced Micro Devices, Inc.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are

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

54 // a total order amongst the global events. See global_event.{cc,hh}
55 // for more explanation.
56 if (inParallelMode && (this != curEventQueue() || global)) {
57 asyncInsert(event);
58 } else {
59 insert(event);
60 }
61 event->flags.set(Event::Scheduled);
62 event->acquire();
63
64 if (DTRACE(Event))
65 event->trace("scheduled");
66}
67
68inline void
69EventQueue::deschedule(Event *event)
70{

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

75 remove(event);
76
77 event->flags.clear(Event::Squashed);
78 event->flags.clear(Event::Scheduled);
79
80 if (DTRACE(Event))
81 event->trace("descheduled");
82
83 event->release();
84}
85
86inline void
87EventQueue::reschedule(Event *event, Tick when, bool always)
88{
89 assert(when >= getCurTick());
90 assert(always || event->scheduled());
91 assert(event->initialized());
92 assert(!inParallelMode || this == curEventQueue());
93
94 if (event->scheduled()) {
95 remove(event);
96 } else {
97 event->acquire();
98 }
99
100 event->setWhen(when, this);
101 insert(event);
102 event->flags.clear(Event::Squashed);
103 event->flags.set(Event::Scheduled);
104
105 if (DTRACE(Event))
106 event->trace("rescheduled");
107}
108
109#endif // __SIM_EVENTQ_IMPL_HH__