Deleted Added
sdiff udiff text old ( 2839:d5dd8a3cdea0 ) new ( 3144:b6e9e1811d71 )
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;

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

52 // queue.
53 if (theQueue() != &mainEventQueue) {
54 exitSimLoop(cause, code);
55 delete this;
56 }
57
58 // otherwise do nothing... the IsExitEvent flag takes care of
59 // exiting the simulation loop and returning this object to Python
60}
61
62
63const char *
64SimLoopExitEvent::description()
65{
66 return "simulation loop exit";
67}
68
69void
70exitSimLoop(Tick when, const std::string &message, int exit_code)
71{
72 new SimLoopExitEvent(when, message, exit_code);
73}
74
75void
76exitSimLoop(const std::string &message, int exit_code)
77{
78 exitSimLoop(curTick, message, exit_code);
79}
80
81void
82CountedDrainEvent::process()
83{
84 if (--count == 0) {
85 exitSimLoop("Finished drain");
86 }

--- 83 unchanged lines hidden ---