Deleted Added
sdiff udiff text old ( 13206:c944ef4abb48 ) new ( 13208:6703cb024823 )
full compact
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright

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

129
130sc_core::sc_object *
131Event::getParentObject() const
132{
133 return parent;
134}
135
136void
137Event::notify()
138{
139 if (scheduler.inUpdate()) {
140 SC_REPORT_ERROR("(E521) immediate notification is not allowed "
141 "during update phase or elaboration", "");
142 }
143
144 // An immediate notification overrides any pending delayed notification.
145 if (delayedNotify.scheduled())
146 scheduler.deschedule(&delayedNotify);
147
148 for (auto s: staticSensitivities)
149 s->notify(this);
150 DynamicSensitivities &ds = dynamicSensitivities;
151 int size = ds.size();
152 int pos = 0;
153 while (pos < size) {
154 if (ds[pos]->notify(this))
155 ds[pos] = ds[--size];
156 else
157 pos++;
158 }
159 ds.resize(size);
160}
161
162void
163Event::notify(const sc_core::sc_time &t)
164{
165 if (delayedNotify.scheduled()) {
166 if (scheduler.delayed(t) >= delayedNotify.when())
167 return;

--- 34 unchanged lines hidden ---