mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-27 00:29:18 +00:00
dbdma: Do interrupt on main thread.
These may be triggered by other threads (such as for audio) so use the timer manager to handle them in the main thread.
This commit is contained in:
parent
95d74a6940
commit
1d75730d44
@ -21,6 +21,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
/** @file Descriptor-based direct memory access emulation. */
|
||||
|
||||
#include <core/timermanager.h>
|
||||
#include <cpu/ppc/ppcmmu.h>
|
||||
#include <devices/common/dbdma.h>
|
||||
#include <devices/common/dmacore.h>
|
||||
@ -261,9 +262,11 @@ void DMAChannel::update_irq() {
|
||||
}
|
||||
}
|
||||
if (cond) {
|
||||
if (int_ctrl)
|
||||
this->int_ctrl->ack_dma_int(this->irq_id, 1);
|
||||
else
|
||||
if (int_ctrl) {
|
||||
TimerManager::get_instance()->add_immediate_timer([this] {
|
||||
this->int_ctrl->ack_dma_int(this->irq_id, 1);
|
||||
});
|
||||
} else
|
||||
LOG_F(ERROR, "%s Interrupt ignored", this->get_name().c_str());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user