diff options
author | Gabe Black <gabeblack@google.com> | 2018-09-11 01:51:27 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-09 21:46:45 +0000 |
commit | 19fbeb515aacbf954dba1d4066007736b1252c0e (patch) | |
tree | 25e8cf29b9886bf1bd5781941e9025522f8cd2e3 /src/systemc/ext/channel/sc_mutex.hh | |
parent | 055b8df385393ebb995cac67f63ff63a858a3bc0 (diff) | |
download | gem5-19fbeb515aacbf954dba1d4066007736b1252c0e.tar.xz |
systemc: Implement sc_mutex.
Change-Id: I8a5bd03b46d44aeca3bba15a01a5f2180b4ed5c7
Reviewed-on: https://gem5-review.googlesource.com/c/12618
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/ext/channel/sc_mutex.hh')
-rw-r--r-- | src/systemc/ext/channel/sc_mutex.hh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/systemc/ext/channel/sc_mutex.hh b/src/systemc/ext/channel/sc_mutex.hh index af35bdd65..12205da9b 100644 --- a/src/systemc/ext/channel/sc_mutex.hh +++ b/src/systemc/ext/channel/sc_mutex.hh @@ -30,7 +30,9 @@ #ifndef __SYSTEMC_EXT_CHANNEL_SC_MUTEX_HH__ #define __SYSTEMC_EXT_CHANNEL_SC_MUTEX_HH__ +#include "../core/sc_event.hh" #include "../core/sc_object.hh" +#include "../core/sc_process_handle.hh" #include "sc_mutex_if.hh" namespace sc_core @@ -46,12 +48,15 @@ class sc_mutex : public sc_mutex_if, public sc_object virtual int trylock(); virtual int unlock(); - virtual const char *kind() const; + virtual const char *kind() const { return "sc_mutex"; } private: // Disabled sc_mutex(const sc_mutex &) : sc_interface(), sc_mutex_if(), sc_object() {} sc_mutex &operator = (const sc_mutex &) { return *this; } + + sc_process_handle holder; + sc_event unlockEvent; }; } // namespace sc_core |