End_Critical_Section

include vmm.inc

VMMCall End_Critical_Section
 

Releases the critical section if the current thread owns the section and the claim count is zero. Uses Flags.

This service decrements the claim count and releases the critical section if the new count is zero. Since releasing the critical section lowers the execution priority of the current thread, this service causes a task switch if a nonsuspended thread has higher priority.

It is extremely risky for a virtual device to end a critical section it did not enter, or which it entered from a thread other than the current thread.

See Also

Begin_Critical_Section, End_Crit_And_Suspend