summaryrefslogtreecommitdiff
path: root/src/systemc/ext
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-06-18 17:04:28 -0700
committerGabe Black <gabeblack@google.com>2018-08-28 21:24:32 +0000
commitc564fe0bcc6d53dd7f1b5dc2c0174bd445fd2a6d (patch)
tree8811974117bd0bdc31a81f7be817ebe81fcedf1a /src/systemc/ext
parentc09bc660bef1ff40bc37263f92b1d8c489aa8c7d (diff)
downloadgem5-c564fe0bcc6d53dd7f1b5dc2c0174bd445fd2a6d.tar.xz
systemc: Add a minimal version of the deprecated sc_process_b.
This type is deprecated, but some tests still rely on it. This change adds just enough of it to satisfy the tests, and also the several different mechanisms for retrieving the sc_process_b which refers to the currently active process. Change-Id: Id122ae5df23744b5de1e1c97573412f97a73b77a Reviewed-on: https://gem5-review.googlesource.com/11351 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.hh5
-rw-r--r--src/systemc/ext/core/sc_process_handle.hh28
2 files changed, 33 insertions, 0 deletions
diff --git a/src/systemc/ext/core/_using.hh b/src/systemc/ext/core/_using.hh
index efc6341cd..255df336f 100644
--- a/src/systemc/ext/core/_using.hh
+++ b/src/systemc/ext/core/_using.hh
@@ -124,6 +124,11 @@ using sc_core::sc_descendent_inclusion_info;
using sc_core::SC_NO_DESCENDANTS;
using sc_core::SC_INCLUDE_DESCENDANTS;
using sc_core::sc_unwind_exception;
+using sc_core::sc_process_b;
+using sc_core::sc_get_curr_process_handle;
+using sc_core::sc_get_current_process_b;
+using sc_core::sc_curr_proc_info;
+using sc_core::sc_curr_proc_handle;
using sc_core::sc_process_handle;
using sc_core::sc_get_current_process_handle;
using sc_core::sc_is_unwinding;
diff --git a/src/systemc/ext/core/sc_process_handle.hh b/src/systemc/ext/core/sc_process_handle.hh
index 55fa2b7db..e577b9e47 100644
--- a/src/systemc/ext/core/sc_process_handle.hh
+++ b/src/systemc/ext/core/sc_process_handle.hh
@@ -77,6 +77,34 @@ class sc_unwind_exception : public std::exception
sc_unwind_exception();
};
+// Deprecated
+// An incomplete version of sc_process_b to satisfy the tests.
+class sc_process_b
+{
+ public:
+ const char *file;
+ int lineno;
+ const char *name();
+ const char *kind();
+};
+
+// Deprecated
+sc_process_b *sc_get_curr_process_handle();
+static inline sc_process_b *
+sc_get_current_process_b()
+{
+ return sc_get_curr_process_handle();
+}
+
+// Deprecated/nonstandard
+struct sc_curr_proc_info
+{
+ sc_process_b *process_handle;
+ sc_curr_proc_kind kind;
+ sc_curr_proc_info() : process_handle(NULL), kind(SC_NO_PROC_) {}
+};
+typedef const sc_curr_proc_info *sc_curr_proc_handle;
+
class sc_process_handle
{
private: