Get_Crit_Status_No_Block

include vmm.inc

VMMcall Get_Crit_Status_No_Block

mov [VM], ebx ; VM handle of owner

mov [Claims], ecx ; number of times critical section claimed

jc high_priority ; priority is Critical_Section_Boost or higher


The Get_Crit_Status_No_Block service returns the claim count and handle of the owner of the critical section. Unlike the Get_Crit_Section_Status service, this service returns immediately (without blocking) even if a delayed request to release the critical section is pending.

This service is only available for Windows version 3.1 or later.

Parameters

This service has no parameters.

Return Value

The ECX register contains the critical section claim count, and the EBX register contains the handle identifying the virtual machine owning the critical section. If the ECX register is 0, the EBX register contains the handle of the current virtual machine.

The carry flag is set if the current virtual machine has an execution priority greater than or equal to Critical_Section_Boost, such as during a hardware interrupt simulation.

Comments

In some cases, this service may indicate that the critical section is currently owned even when it will be released before returning to the virtual machine.

This is an asynchronous service; it may be called at interrupt time.

Uses

Flags

See Also

End_Critical_Section, Get_Crit_Section_Status