sim_events.cc (2667:fe64b8353b1c) sim_events.cc (2797:b5f26b4eacef)
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;

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

73}
74
75void
76exitSimLoop(const std::string &message, int exit_code)
77{
78 exitSimLoop(curTick, message, exit_code);
79}
80
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;

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

73}
74
75void
76exitSimLoop(const std::string &message, int exit_code)
77{
78 exitSimLoop(curTick, message, exit_code);
79}
80
81void
82CountedQuiesceEvent::process()
83{
84 if (--count == 0) {
85 exitSimLoop("Finished quiesce");
86 }
87}
88
81//
82// constructor: automatically schedules at specified time
83//
84CountedExitEvent::CountedExitEvent(EventQueue *q, const std::string &_cause,
85 Tick _when, int &_downCounter)
86 : Event(q, Sim_Exit_Pri),
87 cause(_cause),
88 downCounter(_downCounter)

--- 73 unchanged lines hidden ---
89//
90// constructor: automatically schedules at specified time
91//
92CountedExitEvent::CountedExitEvent(EventQueue *q, const std::string &_cause,
93 Tick _when, int &_downCounter)
94 : Event(q, Sim_Exit_Pri),
95 cause(_cause),
96 downCounter(_downCounter)

--- 73 unchanged lines hidden ---