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:
Michael M
2017-08-23 16:45:42 -07:00
parent 4ee85a3e07
commit b58f8d19ab
13 changed files with 35 additions and 35 deletions

View File

@ -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)

View File

@ -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)