Big mutex overhaul - remove our custom ones, make them non-recursive where possible

This commit is contained in:
Henrik Rydgard authored and Henrik Rydgård committed 2017-02-28 11:40:29 +01:00
1 parent 54f862cda6
commit 26a2d42731
75 files changed
+561 -882

No files matched your search

+6 -5
View File
@@ -15,10 +15,11 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include <algorithm>
#include "ppsspp_config.h"
#include "base/mutex.h"
#include <algorithm>
#include <mutex>
#include "Common/Common.h"
#include "Common/MemoryUtil.h"
#include "Common/MemArena.h"
@@ -77,7 +78,7 @@ u32 g_MemorySize;
// Used to store the PSP model on game startup.
u32 g_PSPModel;
recursive_mutex g_shutdownLock;
std::mutex g_shutdownLock;
// We don't declare the IO region in here since its handled by other means.
static MemoryView views[] =
@@ -315,7 +316,7 @@ void DoState(PointerWrap &p) {
}
void Shutdown() {
lock_guard guard(g_shutdownLock);
std::lock_guard<std::mutex> guard(g_shutdownLock);
u32 flags = 0;
MemoryMap_Shutdown(flags);
base = nullptr;