Process end of simulation events.

This is copied from the development branch. It allows the processing
of events that happen at the simulation finish time.
This commit is contained in:
Cary R 2007-12-03 16:58:39 -08:00 committed by Stephen Williams
parent 1fb93c0565
commit 3eb86a2376
1 changed files with 3 additions and 1 deletions

View File

@ -442,11 +442,12 @@ void schedule_simulate(void)
signals_capture();
while (schedule_runnable && sched_list) {
while (sched_list) {
if (schedule_stopped_flag) {
schedule_stopped_flag = false;
stop_handler(0);
if (!schedule_runnable) break;
continue;
}
@ -457,6 +458,7 @@ void schedule_simulate(void)
postponed sync events. Run them all. */
if (ctim->delay > 0) {
if (!schedule_runnable) break;
struct event_s*sync_cur;
while ( (sync_cur = pull_sync_event()) ) {
assert(sync_cur->type == TYPE_GEN);