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:
@ -21,10 +21,12 @@ aspect BochsListener {
|
|||||||
bool onAddition()
|
bool onAddition()
|
||||||
{
|
{
|
||||||
// Register the timer listener in the Bochs simulator:
|
// 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);
|
setId(INVALID_TIMER);
|
||||||
return false; // unable to register the timer (error in Bochs' function call)
|
return false; // unable to register the timer (error in Bochs' function call)
|
||||||
}
|
}
|
||||||
|
setId(id);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
void onDeletion()
|
void onDeletion()
|
||||||
|
|||||||
Reference in New Issue
Block a user