CriticalSection

final class ntoseye.CriticalSection

Subclass of BaseRecord.

An RTL_CRITICAL_SECTION (!cs <address>).

property address: int
property contention_count: Diagnostic[int]

How many times threads waited for it (the debug record’s ContentionCount).

property debug_info: Diagnostic[int]
property lock_count: Diagnostic[int]

LockCount: from Windows Server 2003 SP1, bit 0 is clear while the section is held, bit 1 clear when a waiter was woken, and the bits above count the waiters, inverted.

property lock_semaphore: Diagnostic[int]
property locked: bool | None

Whether a thread holds it.

property owning_thread: Diagnostic[int]

The thread that holds it, by its TID (OwningThread).

property recursion_count: Diagnostic[int]
property spin_count: Diagnostic[int]
property symbol: str | None

The symbol at its address (ntdll!LdrpLoaderLock), when it is a global.

property waiters: int | None

How many threads wait for it.