event.cc (13288:f1c04129f709) event.cc (13295:e71ae162b863)
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

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

186}
187
188bool
189Event::triggered() const
190{
191 return _triggeredStamp == scheduler.changeStamp();
192}
193
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

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

186}
187
188bool
189Event::triggered() const
190{
191 return _triggeredStamp == scheduler.changeStamp();
192}
193
194void
195Event::clearParent()
196{
197 if (!parent)
198 return;
199 Object::getFromScObject(parent)->delChildEvent(sc_event());
200 parent = nullptr;
201 topLevelEvents.emplace(topLevelEvents.end(), sc_event());
202}
203
194Events topLevelEvents;
195Events allEvents;
196
197EventsIt
198findEvent(const std::string &name)
199{
200 EventsIt it;
201 for (it = allEvents.begin(); it != allEvents.end(); it++)
202 if (!strcmp((*it)->name(), name.c_str()))
203 break;
204
205 return it;
206}
207
208} // namespace sc_gem5
204Events topLevelEvents;
205Events allEvents;
206
207EventsIt
208findEvent(const std::string &name)
209{
210 EventsIt it;
211 for (it = allEvents.begin(); it != allEvents.end(); it++)
212 if (!strcmp((*it)->name(), name.c_str()))
213 break;
214
215 return it;
216}
217
218} // namespace sc_gem5