bochs bugfix: store the timer ID for correct deregistration

Over a few indirections, this broke Bochs' 16550 UART simulation after
transferring a few hundreds of bytes.  The UART uses internal timers to
simulate the configured baud rate; these timers cease to work after
repeated misuse from the Fail/Bochs bridge.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1887 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hsc
2012-11-06 18:29:45 +00:00
parent 1668e21ce1
commit 9c3755363b

View File

@ -21,10 +21,12 @@ aspect BochsListener {
bool onAddition()
{
// Register the timer listener in the Bochs simulator:
if(m_registerTimer(this) == -1) {
timer_id_t id = m_registerTimer(this);
if (id == -1) {
setId(INVALID_TIMER);
return false; // unable to register the timer (error in Bochs' function call)
}
setId(id);
return true;
}
void onDeletion()