sim: Expose the system's byte order as a param
[gem5.git] / src / sim / sim_exit.hh
index da71cc912cb33a4ae9ee0ab1c18cf3b4f9d5ba66..a79d3e2cd045f3e88c0d7c3ad00c8c485c8a9b65 100644 (file)
@@ -24,9 +24,6 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Nathan Binkert
- *          Steve Reinhardt
  */
 
 #ifndef __SIM_EXIT_HH__
 #include <string>
 
 #include "base/types.hh"
-#include "sim/core.hh"
 
-// forward declaration
-class Callback;
-class EventQueue;
-class SimLoopExitEvent;
+Tick curTick();
 
 /// Register a callback to be called when Python exits.  Defined in
 /// sim/main.cc.
-void registerExitCallback(Callback *);
+void registerExitCallback(const std::function<void()> &);
 
 /// Schedule an event to exit the simulation loop (returning to
 /// Python) at the end of the current cycle (curTick()).  The message
 /// and exit_code parameters are saved in the SimLoopExitEvent to
 /// indicate why the exit occurred.
 void exitSimLoop(const std::string &message, int exit_code = 0,
-                 Tick when = curTick(), Tick repeat = 0);
+                 Tick when = curTick(), Tick repeat = 0,
+                 bool serialize = false);
+/// Schedule an event as above, but make it high priority so it runs before
+/// any normal events which are schedule at the current time.
+void exitSimLoopNow(const std::string &message, int exit_code = 0,
+                    Tick repeat = 0, bool serialize = false);
 
 #endif // __SIM_EXIT_HH__