mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-23 11:19:03 +02:00
Big mutex overhaul - remove our custom ones, make them non-recursive where possible
This commit is contained in:
1 parent
54f862cda6
commit
26a2d42731
75 files changed
+561
-882
No files matched your search
@@ -19,8 +19,8 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <mutex>
|
||||
|
||||
#include "base/mutex.h"
|
||||
#include "Core/FileSystems/FileSystem.h"
|
||||
|
||||
class MetaFileSystem : public IHandleAllocator, public IFileSystem {
|
||||
@@ -42,7 +42,7 @@ private:
|
||||
|
||||
std::string startingDirectory;
|
||||
int lastOpenError;
|
||||
recursive_mutex lock;
|
||||
std::recursive_mutex lock; // must be recursive
|
||||
|
||||
public:
|
||||
MetaFileSystem() {
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
int ReadEntireFile(const std::string &filename, std::vector<u8> &data);
|
||||
|
||||
void SetStartingDirectory(const std::string &dir) {
|
||||
lock_guard guard(lock);
|
||||
std::lock_guard<std::recursive_mutex> guard(lock);
|
||||
startingDirectory = dir;
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user