Deleted Added
sdiff udiff text old ( 4385:5beaa4f8f821 ) new ( 5606:6da7a58b0bc8 )
full compact
1/*
2 * Copyright (c) 2006 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;

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

51
52 if (num_cycles < 0)
53 fatal("simulate: num_cycles must be >= 0 (was %d)\n", num_cycles);
54 else if (curTick + num_cycles < 0) //Overflow
55 num_cycles = MaxTick;
56 else
57 num_cycles = curTick + num_cycles;
58
59 Event *limit_event;
60 limit_event = schedExitSimLoop("simulate() limit reached", num_cycles);
61
62 while (1) {
63 // there should always be at least one event (the SimLoopExitEvent
64 // we just scheduled) in the queue
65 assert(!mainEventQueue.empty());
66 assert(curTick <= mainEventQueue.nextTick() &&
67 "event scheduled in the past");
68

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

77 se_event = dynamic_cast<SimLoopExitEvent *>(exit_event);
78
79 if (se_event == NULL)
80 panic("Bogus exit event class!");
81
82 // if we didn't hit limit_event, delete it
83 if (se_event != limit_event) {
84 assert(limit_event->scheduled());
85 limit_event->deschedule();
86 delete limit_event;
87 }
88
89 return se_event;
90 }
91
92 if (async_event) {
93 async_event = false;
94 if (async_statdump || async_statreset) {

--- 26 unchanged lines hidden ---