qemu: IOPortListener
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1622 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -21,4 +21,23 @@ QEMUController::~QEMUController()
|
||||
delete m_Mem;
|
||||
}
|
||||
|
||||
// FIXME: copied from BochsController; remove redundancy!
|
||||
void QEMUController::onIOPort(unsigned char data, unsigned port, bool out) {
|
||||
// Check for active IOPortListeners:
|
||||
io_cache_t &buffer_cache = m_LstList.getIOBuffer();
|
||||
io_cache_t::iterator it = buffer_cache.begin();
|
||||
while (it != buffer_cache.end()) {
|
||||
IOPortListener* pIOPt = (*it);
|
||||
if (pIOPt->isMatching(port, out)) {
|
||||
pIOPt->setData(data);
|
||||
it = buffer_cache.makeActive(m_LstList, it);
|
||||
// "it" has already been set to the next element (by calling
|
||||
// makeActive()):
|
||||
continue; // -> skip iterator increment
|
||||
}
|
||||
it++;
|
||||
}
|
||||
m_LstList.triggerActiveListeners();
|
||||
}
|
||||
|
||||
} // end-of-namespace: fail
|
||||
|
||||
Reference in New Issue
Block a user