mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
Merge pull request #5973 from ligfx/renamefifoqueue
Rename Common::FifoQueue to Common::SPSCQueue
This commit is contained in:
@ -13,8 +13,8 @@
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Common/FifoQueue.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/SPSCQueue.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Common/Thread.h"
|
||||
|
||||
@ -63,7 +63,7 @@ static std::unordered_map<std::string, EventType> s_event_types;
|
||||
static std::vector<Event> s_event_queue;
|
||||
static u64 s_event_fifo_id;
|
||||
static std::mutex s_ts_write_lock;
|
||||
static Common::FifoQueue<Event, false> s_ts_queue;
|
||||
static Common::SPSCQueue<Event, false> s_ts_queue;
|
||||
|
||||
static float s_last_OC_factor;
|
||||
static constexpr int MAX_SLICE_LENGTH = 20000;
|
||||
|
@ -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;
|
||||
@ -139,7 +139,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
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <vector>
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Event.h"
|
||||
#include "Common/FifoQueue.h"
|
||||
#include "Common/SPSCQueue.h"
|
||||
#include "Common/TraversalClient.h"
|
||||
#include "Core/NetPlayProto.h"
|
||||
#include "InputCommon/GCPadStatus.h"
|
||||
@ -109,10 +109,10 @@ protected:
|
||||
std::recursive_mutex async_queue_write;
|
||||
} m_crit;
|
||||
|
||||
Common::FifoQueue<sf::Packet, false> m_async_queue;
|
||||
Common::SPSCQueue<sf::Packet, false> m_async_queue;
|
||||
|
||||
std::array<Common::FifoQueue<GCPadStatus>, 4> m_pad_buffer;
|
||||
std::array<Common::FifoQueue<NetWiimote>, 4> m_wiimote_buffer;
|
||||
std::array<Common::SPSCQueue<GCPadStatus>, 4> m_pad_buffer;
|
||||
std::array<Common::SPSCQueue<NetWiimote>, 4> m_wiimote_buffer;
|
||||
|
||||
NetPlayUI* m_dialog = nullptr;
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <thread>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include "Common/FifoQueue.h"
|
||||
#include "Common/SPSCQueue.h"
|
||||
#include "Common/Timer.h"
|
||||
#include "Common/TraversalClient.h"
|
||||
#include "Core/NetPlayProto.h"
|
||||
@ -114,7 +114,7 @@ private:
|
||||
|
||||
std::string m_selected_game;
|
||||
std::thread m_thread;
|
||||
Common::FifoQueue<sf::Packet, false> m_async_queue;
|
||||
Common::SPSCQueue<sf::Packet, false> m_async_queue;
|
||||
|
||||
ENetHost* m_server = nullptr;
|
||||
TraversalClient* m_traversal_client = nullptr;
|
||||
|
Reference in New Issue
Block a user