Use std::recursive vs std::mutex

This commit is contained in:
Maschell
2026-01-20 18:26:50 +01:00
parent 303984c83d
commit 18a2a8cbc2
5 changed files with 19 additions and 9 deletions

View File

@@ -4,7 +4,7 @@ char gJumpHeapData[JUMP_HEAP_DATA_SIZE] __attribute__((section(".data")));
MEMHeapHandle gJumpHeapHandle __attribute__((section(".data")));
std::shared_ptr<FunctionAddressProvider> gFunctionAddressProvider;
std::mutex gPatchedFunctionsMutex;
std::recursive_mutex gPatchedFunctionsMutex;
std::vector<std::shared_ptr<PatchedFunctionData>> gPatchedFunctions;
void *(*gMEMAllocFromDefaultHeapExForThreads)(uint32_t size, int align);

View File

@@ -3,6 +3,7 @@
#include "version.h"
#include <coreinit/memheap.h>
#include <memory>
#include <mutex>
#include <vector>
#define MODULE_VERSION "v0.2.3"
@@ -13,7 +14,7 @@ extern char gJumpHeapData[];
extern MEMHeapHandle gJumpHeapHandle;
extern std::shared_ptr<FunctionAddressProvider> gFunctionAddressProvider;
extern std::mutex gPatchedFunctionsMutex;
extern std::recursive_mutex gPatchedFunctionsMutex;
extern std::vector<std::shared_ptr<PatchedFunctionData>> gPatchedFunctions;
extern void *(*gMEMAllocFromDefaultHeapExForThreads)(uint32_t size, int align);