mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06: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:
@ -5,11 +5,11 @@ add_dolphin_test(BlockingLoopTest BlockingLoopTest.cpp)
|
||||
add_dolphin_test(BusyLoopTest BusyLoopTest.cpp)
|
||||
add_dolphin_test(CommonFuncsTest CommonFuncsTest.cpp)
|
||||
add_dolphin_test(EventTest EventTest.cpp)
|
||||
add_dolphin_test(FifoQueueTest FifoQueueTest.cpp)
|
||||
add_dolphin_test(FixedSizeQueueTest FixedSizeQueueTest.cpp)
|
||||
add_dolphin_test(FlagTest FlagTest.cpp)
|
||||
add_dolphin_test(MathUtilTest MathUtilTest.cpp)
|
||||
add_dolphin_test(NandPathsTest NandPathsTest.cpp)
|
||||
add_dolphin_test(SPSCQueueTest SPSCQueueTest.cpp)
|
||||
add_dolphin_test(StringUtilTest StringUtilTest.cpp)
|
||||
add_dolphin_test(SwapTest SwapTest.cpp)
|
||||
add_dolphin_test(x64EmitterTest x64EmitterTest.cpp)
|
||||
|
@ -5,11 +5,11 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <thread>
|
||||
|
||||
#include "Common/FifoQueue.h"
|
||||
#include "Common/SPSCQueue.h"
|
||||
|
||||
TEST(FifoQueue, Simple)
|
||||
TEST(SPSCQueue, Simple)
|
||||
{
|
||||
Common::FifoQueue<u32> q;
|
||||
Common::SPSCQueue<u32> q;
|
||||
|
||||
EXPECT_EQ(0u, q.Size());
|
||||
EXPECT_TRUE(q.Empty());
|
||||
@ -43,9 +43,9 @@ TEST(FifoQueue, Simple)
|
||||
EXPECT_TRUE(q.Empty());
|
||||
}
|
||||
|
||||
TEST(FifoQueue, MultiThreaded)
|
||||
TEST(SPSCQueue, MultiThreaded)
|
||||
{
|
||||
Common::FifoQueue<u32> q;
|
||||
Common::SPSCQueue<u32> q;
|
||||
|
||||
auto inserter = [&q]() {
|
||||
for (u32 i = 0; i < 100000; ++i)
|
Reference in New Issue
Block a user