summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Config/Config.cpp
diff options
context:
space:
mode:
authorS David <2100425+s-daveb@users.noreply.github.com>2019-12-22 00:32:17 -0500
committerS David <2100425+s-daveb@users.noreply.github.com>2019-12-22 00:49:17 -0500
commit21f42fafb7f6d5a7dd696d83c1892bf5326ff05f (patch)
tree801e77ec479228946f71db9a6b3fd2583b8c96cf /Source/Core/Common/Config/Config.cpp
parent8a50d9c540de1528baf0e5fbb076ccf7e484c988 (diff)
MacOS: Fixes configuration hang; bump MacOS SDK.
Removed conditional use of std::mutex instead of std::shared_mutex on MacOS. Because MacOS < 10.12 did not support std::shared_mutex, a previous commit naïvely substituted std::mutex, which does not have the same behavior. Reverses PR #8273, which substitues std::mutex for std::shared_mutex on macOS, and results in several bugs that seem to only affect MacOS - https://bugs.dolphin-emu.org/issues/11919 - https://bugs.dolphin-emu.org/issues/11842 - https://bugs.dolphin-emu.org/issues/11845 This change eliminates conditional code for MacOS in the core configuration layer code and enables the use of modern language features that are more secure and thread-safe.
Diffstat (limited to 'Source/Core/Common/Config/Config.cpp')
-rw-r--r--Source/Core/Common/Config/Config.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/Source/Core/Common/Config/Config.cpp b/Source/Core/Common/Config/Config.cpp
index b65b1d6fad..0dbcb1d9d9 100644
--- a/Source/Core/Common/Config/Config.cpp
+++ b/Source/Core/Common/Config/Config.cpp
@@ -5,11 +5,7 @@
#include <algorithm>
#include <list>
#include <map>
-#if __APPLE__
-#include <mutex>
-#else
#include <shared_mutex>
-#endif
#include "Common/Config/Config.h"
@@ -21,19 +17,10 @@ static Layers s_layers;
static std::list<ConfigChangedCallback> s_callbacks;
static u32 s_callback_guards = 0;
-// Mac supports shared_mutex since 10.12 and we're targeting 10.10,
-// so only use unique locks there...
-#if __APPLE__
-static std::mutex s_layers_rw_lock;
-
-using ReadLock = std::unique_lock<std::mutex>;
-using WriteLock = std::unique_lock<std::mutex>;
-#else
static std::shared_mutex s_layers_rw_lock;
using ReadLock = std::shared_lock<std::shared_mutex>;
using WriteLock = std::unique_lock<std::shared_mutex>;
-#endif
void AddLayerInternal(std::shared_ptr<Layer> layer)
{