Implement RAII guards for exclusive and shared push locks
All checks were successful
Builds / ExectOS (i686, debug) (push) Successful in 37s
Builds / ExectOS (amd64, debug) (push) Successful in 47s
Builds / ExectOS (i686, release) (push) Successful in 36s
Builds / ExectOS (amd64, release) (push) Successful in 46s

This commit is contained in:
2026-07-10 08:27:09 +02:00
parent c7b257dfc4
commit f51c7a5ce5
2 changed files with 62 additions and 4 deletions

View File

@@ -841,13 +841,10 @@ OB::LifeCycle::DeleteObject(IN PVOID Object,
{
/* Acquire exclusive access to the object type tracking list */
KE::CriticalRegionGuard CriticalRegion;
KE::PushLock::AcquireExclusivePushLock(&ObjectType->TypeLock);
KE::PushLockExclusiveGuard PushLock(&ObjectType->TypeLock);
/* Unlink the object from the creator type list */
RTL::LinkedList::RemoveEntryList(&CreatorInfo->TypeList);
/* Release the object type tracking list */
KE::PushLock::ReleaseExclusivePushLock(&ObjectType->TypeLock);
}
/* Check if the object has an allocated name buffer */