summaryrefslogtreecommitdiff
path: root/src/systemc/ext/core/sc_process_handle.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-05-18 02:12:34 -0700
committerGabe Black <gabeblack@google.com>2018-08-08 10:07:26 +0000
commit7adb1b250b712920ea5d685f146ad6df55346393 (patch)
treec431de9f29f2c7d1dc5a6e581cfcf7031bb26a49 /src/systemc/ext/core/sc_process_handle.hh
parent4b2e28307d0a1c2b31e403e8e394261eb363a7a9 (diff)
downloadgem5-7adb1b250b712920ea5d685f146ad6df55346393.tar.xz
systemc: Stub out all the standard utilility classes and functions.
Change-Id: I9e9724edb6281e0b0a6bae5546b0ede77d295c12 Reviewed-on: https://gem5-review.googlesource.com/10841 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/ext/core/sc_process_handle.hh')
-rw-r--r--src/systemc/ext/core/sc_process_handle.hh21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/systemc/ext/core/sc_process_handle.hh b/src/systemc/ext/core/sc_process_handle.hh
index ce3fe03cd..a928ab3ad 100644
--- a/src/systemc/ext/core/sc_process_handle.hh
+++ b/src/systemc/ext/core/sc_process_handle.hh
@@ -33,6 +33,13 @@
#include <exception>
#include <vector>
+namespace sc_gem5
+{
+
+class Process;
+
+} // namespace sc_gem5
+
namespace sc_core
{
@@ -67,12 +74,26 @@ class sc_unwind_exception : public std::exception
class sc_process_handle
{
+ private:
+ ::sc_gem5::Process *_gem5_process;
+
public:
sc_process_handle();
sc_process_handle(const sc_process_handle &);
explicit sc_process_handle(sc_object *);
~sc_process_handle();
+ // These non-standard operators provide access to the data structure which
+ // actually tracks the process within gem5. By making them operators, we
+ // can minimize the symbols added to the class namespace.
+ operator ::sc_gem5::Process * () const { return _gem5_process; }
+ sc_process_handle &
+ operator = (::sc_gem5::Process *p)
+ {
+ _gem5_process = p;
+ return *this;
+ }
+
bool valid() const;
sc_process_handle &operator = (const sc_process_handle &);