30a31
> #include <string>
38a40
> #include "systemc/ext/utils/sc_report_handler.hh"
46c48,55
< Process *p = new Method(name, func);
---
> Method *p = new Method(name, func);
> if (::sc_core::sc_is_running()) {
> std::string name = p->name();
> delete p;
> SC_REPORT_ERROR("(E541) call to SC_METHOD in sc_module while "
> "simulation running", name.c_str());
> return nullptr;
> }
54c63,70
< Process *p = new Thread(name, func);
---
> Thread *p = new Thread(name, func);
> if (::sc_core::sc_is_running()) {
> std::string name = p->name();
> delete p;
> SC_REPORT_ERROR("(E542) call to SC_THREAD in sc_module while "
> "simulation running", name.c_str());
> return nullptr;
> }
62c78,85
< Process *p = new CThread(name, func);
---
> CThread *p = new CThread(name, func);
> if (::sc_core::sc_is_running()) {
> std::string name = p->name();
> delete p;
> SC_REPORT_ERROR("(E543) call to SC_CTHREAD in sc_module while "
> "simulation running", name.c_str());
> return nullptr;
> }