diff options
author | Gabe Black <gabeblack@google.com> | 2018-10-06 00:10:20 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-16 01:00:42 +0000 |
commit | 05f2a5f4f67c6d6b71497a0b6c75faf728f963f6 (patch) | |
tree | 9901e11e6fcefc25d8f4b4e09957e3ee12b69a76 /src/systemc/core/sc_event.cc | |
parent | e9b366922b6b2dcb9e36bfa87eb58aefc3e138fb (diff) | |
download | gem5-05f2a5f4f67c6d6b71497a0b6c75faf728f963f6.tar.xz |
systemc: Distinguish internal events from normal sc_events.
The internal events aren't supposed to show up in the namespace or as
children of objects.
Change-Id: Id04b9bfe2e1f8f216390dd989797558eaf33d715
Reviewed-on: https://gem5-review.googlesource.com/c/13309
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/core/sc_event.cc')
-rw-r--r-- | src/systemc/core/sc_event.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/systemc/core/sc_event.cc b/src/systemc/core/sc_event.cc index b2dc0e525..0eeae038f 100644 --- a/src/systemc/core/sc_event.cc +++ b/src/systemc/core/sc_event.cc @@ -389,6 +389,19 @@ sc_event::operator | (const sc_event_or_list &eol) const return expr; } +sc_event::sc_event(bool) : + _gem5_event(new ::sc_gem5::Event( + this, sc_core::sc_gen_unique_name( + "$$$internal kernel event$$$"), true)) +{} + +sc_event::sc_event(bool, const char *_name) : + _gem5_event(new ::sc_gem5::Event( + this, + (std::string("$$$internal kernel event$$$") + _name).c_str(), + true)) +{} + const std::vector<sc_event *> & sc_get_top_level_events() { @@ -404,3 +417,11 @@ sc_find_event(const char *name) } } // namespace sc_core + +namespace sc_gem5 +{ + +InternalScEvent::InternalScEvent() : sc_event(true) {} +InternalScEvent::InternalScEvent(const char *_name) : sc_event(true, _name) {} + +} // namespace sc_gem5 |