From 05f2a5f4f67c6d6b71497a0b6c75faf728f963f6 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sat, 6 Oct 2018 00:10:20 -0700 Subject: 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 Maintainer: Gabe Black --- src/systemc/ext/core/sc_event.hh | 19 ++++++++++++++++++- src/systemc/ext/core/sc_join.hh | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'src/systemc/ext/core') diff --git a/src/systemc/ext/core/sc_event.hh b/src/systemc/ext/core/sc_event.hh index 90c1911ca..90fd41f2a 100644 --- a/src/systemc/ext/core/sc_event.hh +++ b/src/systemc/ext/core/sc_event.hh @@ -45,6 +45,7 @@ namespace sc_gem5 class Event; class DynamicSensitivityEventAndList; class DynamicSensitivityEventOrList; +class InternalScEvent; } @@ -196,6 +197,10 @@ class sc_event sc_event_or_expr operator | (const sc_event &) const; sc_event_or_expr operator | (const sc_event_or_list &) const; + protected: + explicit sc_event(bool); + explicit sc_event(bool, const char *); + private: // Disabled sc_event(const sc_event &) {} @@ -235,7 +240,7 @@ class sc_event_finder_t : public sc_event_finder const sc_event & find_event(sc_interface *if_p=NULL) const override { - static const sc_event none; + static const sc_gem5::InternalScEvent none; const IF *iface = if_p ? dynamic_cast(if_p) : dynamic_cast(_port->get_interface()); if (!iface) { @@ -258,4 +263,16 @@ sc_event *sc_find_event(const char *); } // namespace sc_core +namespace sc_gem5 +{ + +class InternalScEvent : public ::sc_core::sc_event +{ + public: + InternalScEvent(); + InternalScEvent(const char *); +}; + +} // namespace sc_gem5 + #endif //__SYSTEMC_EXT_CORE_SC_INTERFACE_HH__ diff --git a/src/systemc/ext/core/sc_join.hh b/src/systemc/ext/core/sc_join.hh index 49e54ceee..3b227d311 100644 --- a/src/systemc/ext/core/sc_join.hh +++ b/src/systemc/ext/core/sc_join.hh @@ -52,7 +52,7 @@ class sc_join void wait_clocked(); private: - sc_event joinEvent; + sc_gem5::InternalScEvent joinEvent; int remaining; }; -- cgit v1.2.3