summaryrefslogtreecommitdiff
path: root/src/systemc/ext
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemc/ext')
-rw-r--r--src/systemc/ext/core/sc_module.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/systemc/ext/core/sc_module.hh b/src/systemc/ext/core/sc_module.hh
index 0600aa6e6..68d2174b3 100644
--- a/src/systemc/ext/core/sc_module.hh
+++ b/src/systemc/ext/core/sc_module.hh
@@ -244,6 +244,12 @@ typedef sc_module sc_channel;
bool sc_start_of_simulation_invoked();
bool sc_end_of_simulation_invoked();
+// Nonstandard
+// Allocates a module of type x and records a pointer to it so that it gets
+// destructed automatically at the end of the simulation.
+sc_module *sc_module_sc_new(sc_module *);
+#define SC_NEW(x) ::sc_core::sc_module_sc_new(new x);
+
} // namespace sc_core
#endif //__SYSTEMC_EXT_CORE_SC_MODULE_HH__