ARM64EC: Drop redundant ThreadCreationMutex locks

This commit is contained in:
Billy Laws committed 2025-08-07 02:04:48 +01:00
1 parent 2f925aeb22
commit cd1cf6f615
1 file changed
-4
-4
View File
@@ -804,8 +804,6 @@ void NotifyMemoryAlloc(void* Address, SIZE_T Size, ULONG Type, ULONG Prot, BOOL
if (!After) {
ThreadCreationMutex.lock();
} else {
if (!Status) {
std::scoped_lock Lock(ThreadCreationMutex);
InvalidationTracker->HandleMemoryProtectionNotification(reinterpret_cast<uint64_t>(Address), static_cast<uint64_t>(Size), Prot);
}
ThreadCreationMutex.unlock();
@@ -838,7 +836,6 @@ void NotifyMemoryProtect(void* Address, SIZE_T Size, ULONG NewProt, BOOL After,
ThreadCreationMutex.lock();
} else {
if (!Status) {
std::scoped_lock Lock(ThreadCreationMutex);
InvalidationTracker->HandleMemoryProtectionNotification(reinterpret_cast<uint64_t>(Address), static_cast<uint64_t>(Size), NewProt);
}
ThreadCreationMutex.unlock();
@@ -866,7 +863,6 @@ void NotifyUnmapViewOfSection(void* Address, BOOL After, NTSTATUS Status) {
if (!After) {
ThreadCreationMutex.lock();
std::scoped_lock Lock(ThreadCreationMutex);
auto [Start, Size] = InvalidationTracker->InvalidateContainingSection(reinterpret_cast<uint64_t>(Address), true);
if (Size) {
std::scoped_lock Lock(CTX->GetCodeInvalidationMutex());