Implement RAII guard for critical regions
Some checks failed
Builds / ExectOS (i686, release) (push) Failing after 30s
Builds / ExectOS (amd64, release) (push) Failing after 32s
Builds / ExectOS (i686, debug) (push) Failing after 40s
Builds / ExectOS (amd64, debug) (push) Failing after 43s

This commit is contained in:
2026-07-10 08:03:58 +02:00
parent a12e21f15c
commit e8fa736c7a
3 changed files with 66 additions and 33 deletions

View File

@@ -840,7 +840,7 @@ OB::LifeCycle::DeleteObject(IN PVOID Object,
if(CreatorInfo && !RTL::LinkedList::ListEmpty(&CreatorInfo->TypeList))
{
/* Acquire exclusive access to the object type tracking list */
KE::KThread::EnterCriticalRegion();
KE::CriticalRegionGuard CriticalRegion;
KE::PushLock::AcquireExclusivePushLock(&ObjectType->TypeLock);
/* Unlink the object from the creator type list */
@@ -848,7 +848,6 @@ OB::LifeCycle::DeleteObject(IN PVOID Object,
/* Release the object type tracking list */
KE::PushLock::ReleaseExclusivePushLock(&ObjectType->TypeLock);
KE::KThread::LeaveCriticalRegion();
}
/* Check if the object has an allocated name buffer */