CPU: Support stalling CPU for bus activity such as DMA

This commit is contained in:
Connor McLaughlin
2019-10-18 00:20:38 +10:00
parent 0324ae2fd7
commit 9d5f3c1306
3 changed files with 13 additions and 0 deletions

View File

@@ -35,6 +35,11 @@ public:
TickCount GetPendingTicks() const { return m_pending_ticks; }
void ResetPendingTicks() { m_pending_ticks = 0; }
void AddPendingTicks(TickCount ticks)
{
m_pending_ticks += ticks;
m_downcount -= ticks;
}
void SetDowncount(TickCount downcount) { m_downcount = (downcount < m_downcount) ? downcount : m_downcount; }
void ResetDowncount() { m_downcount = MAX_SLICE_SIZE; }