summaryrefslogtreecommitdiff
path: root/src/systemc/ext
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-06-15 17:29:44 -0700
committerGabe Black <gabeblack@google.com>2018-08-22 01:04:02 +0000
commit05e48787980102f826632adc3bdfbc711ae559ce (patch)
treecadfee25f5e76ce9b70afd3b0e32158eb18fa7e9 /src/systemc/ext
parent00b411d8d28af46b9067fe252cebd8dddd0ebfec (diff)
downloadgem5-05e48787980102f826632adc3bdfbc711ae559ce.tar.xz
systemc: Add the nonstandard, undocumented halt function.
Used in the tests. Change-Id: I9b4f10600a50e0def1b5d55428cb4ad49e401295 Reviewed-on: https://gem5-review.googlesource.com/11263 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/ext')
-rw-r--r--src/systemc/ext/core/_using.hh1
-rw-r--r--src/systemc/ext/core/sc_module.hh8
2 files changed, 9 insertions, 0 deletions
diff --git a/src/systemc/ext/core/_using.hh b/src/systemc/ext/core/_using.hh
index 5f5a23af4..32cbd7028 100644
--- a/src/systemc/ext/core/_using.hh
+++ b/src/systemc/ext/core/_using.hh
@@ -87,6 +87,7 @@ using sc_core::SC_BIND_PROXY_NIL;
using sc_core::sc_module;
using sc_core::next_trigger;
using sc_core::wait;
+using sc_core::halt;
using sc_core::sc_gen_unique_name;
using sc_core::sc_behavior;
using sc_core::sc_channel;
diff --git a/src/systemc/ext/core/sc_module.hh b/src/systemc/ext/core/sc_module.hh
index c83cf1d3b..931eb3a86 100644
--- a/src/systemc/ext/core/sc_module.hh
+++ b/src/systemc/ext/core/sc_module.hh
@@ -186,6 +186,8 @@ class sc_module : public sc_object
void wait(const sc_time &, const sc_event_and_list &);
void wait(double, sc_time_unit, const sc_event_and_list &);
+ void halt();
+
virtual void before_end_of_elaboration() {}
virtual void end_of_elaboration() {}
virtual void start_of_simulation() {}
@@ -236,6 +238,12 @@ void wait(double, sc_time_unit, const sc_event_and_list &);
#define SC_THREAD(name) /* Implementation defined */
#define SC_CTHREAD(name, clk) /* Implementation defined */
+// Nonstandard
+// Documentation for this is very scarce, but it looks like it's supposed to
+// stop the currently executing cthread, or if a cthread isn't running report
+// an error.
+void halt();
+
const char *sc_gen_unique_name(const char *);
typedef sc_module sc_behavior;