Deleted Added
sdiff udiff text old ( 9356:b279bad40aa3 ) new ( 9952:7437cc334df1 )
full compact
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
9 * redistributions in binary form must reproduce the above copyright

--- 24 unchanged lines hidden (view full) ---

34#include "base/hostinfo.hh"
35#include "sim/eventq_impl.hh"
36#include "sim/sim_events.hh"
37#include "sim/sim_exit.hh"
38#include "sim/stats.hh"
39
40using namespace std;
41
42SimLoopExitEvent::SimLoopExitEvent(const std::string &_cause, int c, Tick r)
43 : Event(Sim_Exit_Pri, IsExitEvent), cause(_cause), code(c), repeat(r)
44{
45}
46
47
48//
49// handle termination event
50//
51void
52SimLoopExitEvent::process()
53{
54 // if this got scheduled on a different queue (e.g. the committed
55 // instruction queue) then make a corresponding event on the main

--- 16 unchanged lines hidden (view full) ---

72
73const char *
74SimLoopExitEvent::description() const
75{
76 return "simulation loop exit";
77}
78
79void
80exitSimLoop(const std::string &message, int exit_code, Tick when, Tick repeat)
81{
82 Event *event = new SimLoopExitEvent(message, exit_code, repeat);
83 mainEventQueue.schedule(event, when);
84}
85
86//
87// constructor: automatically schedules at specified time
88//
89CountedExitEvent::CountedExitEvent(const std::string &_cause, int &counter)
90 : Event(Sim_Exit_Pri), cause(_cause), downCounter(counter)

--- 23 unchanged lines hidden ---