diff options
author | Nathan Binkert <binkertn@umich.edu> | 2007-02-17 20:27:11 -0800 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2007-02-17 20:27:11 -0800 |
commit | 18e245ad0b6ee99f23e2ed67c150413295c69c1f (patch) | |
tree | 0dc24c2803704af1bf18b89a92121dc7a3d70a91 /src/sim | |
parent | 3cb26868287164ee608ea35b142d9ab252dd9362 (diff) | |
download | gem5-18e245ad0b6ee99f23e2ed67c150413295c69c1f.tar.xz |
Pass an exception from a python event through the event queue
back into python so we don't just silently ignore those errors
--HG--
extra : convert_revision : e2f5566a4681f1b8ea80af50071119118afa7d8a
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/async.hh | 1 | ||||
-rw-r--r-- | src/sim/main.cc | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/sim/async.hh b/src/sim/async.hh index 50ae73040..6ee5eb46a 100644 --- a/src/sim/async.hh +++ b/src/sim/async.hh @@ -47,6 +47,7 @@ extern volatile bool async_dump; ///< Async request to dump stats. extern volatile bool async_exit; ///< Async request to exit simulator. extern volatile bool async_io; ///< Async I/O request (SIGIO). extern volatile bool async_alarm; ///< Async alarm event (SIGALRM). +extern volatile bool async_exception; ///< Python exception. //@} #endif // __ASYNC_HH__ diff --git a/src/sim/main.cc b/src/sim/main.cc index 9f9a56450..13850f255 100644 --- a/src/sim/main.cc +++ b/src/sim/main.cc @@ -82,6 +82,7 @@ volatile bool async_dumpreset = false; volatile bool async_exit = false; volatile bool async_io = false; volatile bool async_alarm = false; +volatile bool async_exception = false; /// Stats signal handler. void @@ -371,6 +372,11 @@ simulate(Tick num_cycles = MaxTick) async_alarm = false; pollQueue.service(); } + + if (async_exception) { + async_exception = false; + return NULL; + } } } |