Change-Id: Ief88b9af0119ba4b007f79905db2522b5f95b820
Reviewed-on: https://gem5-review.googlesource.com/c/12811
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
void
sc_stop()
{
+ static bool stop_called = false;
+ if (stop_called) {
+ static bool stop_warned = false;
+ if (!stop_warned)
+ SC_REPORT_WARNING("(W545) sc_stop has already been called", "");
+ stop_warned = true;
+ return;
+ }
+ stop_called = true;
+
if (::sc_gem5::Kernel::status() == SC_STOPPED)
return;