MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / UnlockAfterFork

Method UnlockAfterFork

FEXCore/Source/Interface/Core/Core.cpp:431–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

429
430#ifndef _WIN32
431void ContextImpl::UnlockAfterFork(FEXCore::Core::InternalThreadState* LiveThread, bool Child) {
432 Allocator::UnlockAfterFork(LiveThread, Child);
433
434 Profiler::PostForkAction(Child);
435 if (Child) {
436 CodeInvalidationMutex.StealAndDropActiveLocks();
437 if (Config.StrictInProcessSplitLocks) {
438 StrictSplitLockMutex = 0;
439 }
440 } else {
441 CodeInvalidationMutex.unlock();
442 if (Config.StrictInProcessSplitLocks) {
443 FEXCore::Utils::SpinWaitLock::unlock(&StrictSplitLockMutex);
444 }
445 return;
446 }
447}
448
449void ContextImpl::LockBeforeFork(FEXCore::Core::InternalThreadState* Thread) {
450 CodeInvalidationMutex.lock();

Callers

nothing calls this directly

Calls 5

UnlockAfterForkFunction · 0.85
unlockFunction · 0.85
PostForkActionFunction · 0.50
unlockMethod · 0.45

Tested by

no test coverage detected