Begin_V86_Serialization


include vmm.inc

mov     ecx, flags
VMMcall Begin_V86_Serialization

Serializes access to V86 mode among the threads in the system VM by using a mutex called the "V86 mutex". Because the mutex is taken automatically when Begin_Nest_V86_Exec is called in the system VM, a VxD typically does not directly call this service. A VxD might call this service when it needs to perform a nested execution operation into protected mode, and the operation will be reflected into V86 mode at the end of the protected mode chain. Using this service would prevent the VxD's thread from potentially getting blocked at the end of the protected mode chain. Uses Flags.

No return value.

flags

Operation flags. Can be a combination of these values:

Block_Svc_Ints

Service events (and simulated interrupts) in the VM if the thread blocks for the critical section.

Block_Svc_If_Ints_Locked

Service events (and simulated interrupts) in the VM if the thread blocks for the critical section and the VMStat_V86IntsLocked flag is set.

Block_Enable_Ints

Service interrupt events in the VM even if the VM does not currently have interrupts enabled (force interrupts to be enabled). This flag is relevant only if either Block_Svc_Ints or Block_Svc_If_Ints_Locked is set.

Block_Thread_Idle

If the thread blocks for the critical section this thread should be considered idle.


There is a hierarchy between the V86 mutex and the critical section mutex. The V86 mutex can be taken in the system VM when the critical section is owned by another VM, but in the system VM the critical section can only be owned if the V86 mutex is already owned. Calling Begin_Critical_Section in a thread in the system VM takes both mutexes.

Each call to Begin_V86_Serialization should have a corresponding call to End_V86_Serialization.

See also Begin_Critical_Section, Begin_Nest_V86_Exec, End_V86_Serialization