mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-08 00:59:44 +00:00
Rename Common::FifoQueue to Common::SPSCQueue
Since all queues are FIFO data structures, the name wasn't informative as to why you'd use it over a normal queue. I originally thought it had something to do with the hardware graphics FIFO. This renames it using the common acronym SPSC, which stands for single-producer single-consumer, and is most commonly used to talk about lock-free data structures, both of which this is.
This commit is contained in:
parent
4ee85a3e07
commit
b58f8d19ab
13 changed files with 35 additions and 35 deletions
|
@ -16,10 +16,10 @@
|
|||
#include "Common/ChunkFile.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Event.h"
|
||||
#include "Common/FifoQueue.h"
|
||||
#include "Common/Flag.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Common/SPSCQueue.h"
|
||||
#include "Common/Thread.h"
|
||||
#include "Common/Timer.h"
|
||||
|
||||
|
@ -83,8 +83,8 @@ static Common::Event s_request_queue_expanded; // Is set by CPU thread
|
|||
static Common::Event s_result_queue_expanded; // Is set by DVD thread
|
||||
static Common::Flag s_dvd_thread_exiting(false); // Is set by CPU thread
|
||||
|
||||
static Common::FifoQueue<ReadRequest, false> s_request_queue;
|
||||
static Common::FifoQueue<ReadResult, false> s_result_queue;
|
||||
static Common::SPSCQueue<ReadRequest, false> s_request_queue;
|
||||
static Common::SPSCQueue<ReadResult, false> s_result_queue;
|
||||
static std::map<u64, ReadResult> s_result_map;
|
||||
|
||||
static std::unique_ptr<DiscIO::Volume> s_disc;
|
||||
|
@ -140,7 +140,7 @@ void DoState(PointerWrap& p)
|
|||
WaitUntilIdle();
|
||||
|
||||
// Move all results from s_result_queue to s_result_map because
|
||||
// PointerWrap::Do supports std::map but not Common::FifoQueue.
|
||||
// PointerWrap::Do supports std::map but not Common::SPSCQueue.
|
||||
// This won't affect the behavior of FinishRead.
|
||||
ReadResult result;
|
||||
while (s_result_queue.Pop(result))
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/Event.h"
|
||||
#include "Common/FifoQueue.h"
|
||||
#include "Common/Flag.h"
|
||||
#include "Common/SPSCQueue.h"
|
||||
#include "Core/HW/Wiimote.h"
|
||||
#include "Core/HW/WiimoteCommon/WiimoteConstants.h"
|
||||
#include "Core/HW/WiimoteCommon/WiimoteHid.h"
|
||||
|
@ -112,8 +112,8 @@ private:
|
|||
// Triggered when the thread has finished ConnectInternal.
|
||||
Common::Event m_thread_ready_event;
|
||||
|
||||
Common::FifoQueue<Report> m_read_reports;
|
||||
Common::FifoQueue<Report> m_write_reports;
|
||||
Common::SPSCQueue<Report> m_read_reports;
|
||||
Common::SPSCQueue<Report> m_write_reports;
|
||||
};
|
||||
|
||||
class WiimoteScannerBackend
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue