systemc: Don't include the scheduler in an external header file.
authorGabe Black <gabeblack@google.com>
Tue, 9 Oct 2018 23:22:47 +0000 (16:22 -0700)
committerGabe Black <gabeblack@google.com>
Tue, 16 Oct 2018 01:16:20 +0000 (01:16 +0000)
The scheduler is an internal detail and shouldn't be exposed to the
headers in ext. It would transitively include more headers which are
not in ext, making it not self contained.

Change-Id: I8384cde9d19363953ffd0c91e7d8d27f8f79a570
Reviewed-on: https://gem5-review.googlesource.com/c/13336
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/systemc/ext/channel/sc_signal_rv.hh

index 1a47e84ad04aeeb1c70a10602a80b313d9e7ee77..c769f377ab403aa0eff269047845e94f7dd68cf4 100644 (file)
 #define __SYSTEMC_EXT_CHANNEL_SC_SIGNAL_RV_HH__
 
 #include "../core/sc_module.hh" // for sc_gen_unique_name
-#include "../core/scheduler.hh"
 #include "../dt/bit/sc_logic.hh"
 #include "../dt/bit/sc_lv.hh"
 #include "sc_signal.hh"
 
+namespace sc_gem5
+{
+
+class Process;
+Process *getCurrentProcess();
+
+} // namespace sc_gem5
+
 namespace sc_dt
 {
 
@@ -66,7 +73,7 @@ class sc_signal_rv : public sc_signal<sc_dt::sc_lv<W>, SC_MANY_WRITERS>
     virtual void
     write(const sc_dt::sc_lv<W> &l)
     {
-        ::sc_gem5::Process *p = ::sc_gem5::scheduler.current();
+        ::sc_gem5::Process *p = ::sc_gem5::getCurrentProcess();
 
         auto it = inputs.find(p);
         if (it == inputs.end()) {