summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-12-29 12:25:15 -0500
committerLioncash <mathew1800@gmail.com>2020-12-29 12:27:40 -0500
commitf9d8d06037d172b7d42aed68aedcfc18ce51d2b4 (patch)
tree5696be41206345f8068321e6879684c99928c1fd /Source/Core
parent024e983c3a92a07a7101845b1413c1c7290ef148 (diff)
DSP: Make mailboxes private
These aren't used externally anywhere and can be made private.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/DSP/DSPCore.cpp4
-rw-r--r--Source/Core/Core/DSP/DSPCore.h8
2 files changed, 5 insertions, 7 deletions
diff --git a/Source/Core/Core/DSP/DSPCore.cpp b/Source/Core/Core/DSP/DSPCore.cpp
index d06c324118..45e7cdfe8a 100644
--- a/Source/Core/Core/DSP/DSPCore.cpp
+++ b/Source/Core/Core/DSP/DSPCore.cpp
@@ -387,8 +387,8 @@ void SDSP::DoState(PointerWrap& p)
p.Do(step_counter);
p.DoArray(ifx_regs);
accelerator->DoState(p);
- p.Do(mbox[0]);
- p.Do(mbox[1]);
+ p.Do(m_mailbox[0]);
+ p.Do(m_mailbox[1]);
Common::UnWriteProtectMemory(iram, DSP_IRAM_BYTE_SIZE, false);
p.DoArray(iram, DSP_IRAM_SIZE);
Common::WriteProtectMemory(iram, DSP_IRAM_BYTE_SIZE, false);
diff --git a/Source/Core/Core/DSP/DSPCore.h b/Source/Core/Core/DSP/DSPCore.h
index bbb4c0041c..c57a35f4c1 100644
--- a/Source/Core/Core/DSP/DSPCore.h
+++ b/Source/Core/Core/DSP/DSPCore.h
@@ -429,9 +429,6 @@ struct SDSP
u32 iram_crc = 0;
u64 step_counter = 0;
- // Mailbox.
- std::atomic<u32> mbox[2];
-
// Accelerator / DMA / other hardware registers. Not GPRs.
std::array<u16, 256> ifx_regs{};
@@ -445,8 +442,8 @@ struct SDSP
u16* coef = nullptr;
private:
- auto& GetMailbox(Mailbox mailbox) { return mbox[static_cast<u32>(mailbox)]; }
- const auto& GetMailbox(Mailbox mailbox) const { return mbox[static_cast<u32>(mailbox)]; }
+ auto& GetMailbox(Mailbox mailbox) { return m_mailbox[static_cast<u32>(mailbox)]; }
+ const auto& GetMailbox(Mailbox mailbox) const { return m_mailbox[static_cast<u32>(mailbox)]; }
void FreeMemoryPages();
@@ -458,6 +455,7 @@ private:
u16 ReadIFXImpl(u16 address);
+ std::atomic<u32> m_mailbox[2];
DSPCore& m_dsp_core;
Analyzer m_analyzer;
};