include vmm.inc VMMcall _EnterMutex, <MutexHandle, Flags>
Enters a mutex. If the mutex is unowned, the calling thread becomes the owner and execution continues. If the mutex is owned by another thread, the calling thread blocks until the mutex is available. If the mutex is already owned by this thread, the reentry count is incremented and execution continues. Uses C Calling Convention: Uses EAX, ECX, EDX, and Flags.
MutexHandle
Handle of the mutex.
Flags
Action to take when interrupts occur while the virtual machine is blocked for the mutex. This parameter can be a combination of the following values:
Block_Enable_Ints | Service interrupts in the virtual machine even if the virtual machine does not currently have interrupts enabled. This forces interrupts to be enabled. This value is only relevant if either Block_Svc_Ints or Block_Svc_If_Ints_Locked is set. |
Block_Svc_If_Ints_Locked | Service events and simulated interrupts in the virtual machine if the thread blocks for the mutex and the VMStat_V86IntsLocked flag is set. |
Block_Svc_Ints | Service events and simulated interrupts in the virtual machine if the thread blocks for the mutex. |
Block_Thread_Idle | Consider the thread to be idle if it blocks for the mutex. |
The Block_Poll value is reserved and must not be used with this service.
If the mutex has a priority boost and the mutex is entered for the first time, the execution priority of the current thread is boosted by the same amount.
See also _EnterMustComplete, _LeaveMutex