include vmm.inc
VMMCall Begin_Use_Locked_PM_Stack
Moves the current virtual machine to the protected-mode locked stack. Doing so serves two purposes: It helps ensure that the client stack does not overflow (in case the client was previously on a very small private stack), and it ensures that the memory used by the stack is always available. Uses Flags.
Before calling this service, the virtual device must ensure that the current virtual machine is running in protected mode. This means the VMStat_PM_Exec value must be specified in the CB_VM_Status field of the control block for the virtual machine.
The Begin_Nest_Exec service automatically switches to the locked stack if the system determines that the virtual machine should be placed into (or be left in) protected-mode execution. Since most virtual devices rely on the Begin_Nest_Exec service to switch stacks, this service is only useful for virtual devices, such as the virtual PIC device, which explicitly change the execution mode of a virtual machine.
A virtual device can call this service any number of times. Only the first call switches stacks; all subsequent calls increment a counter. If a virtual device locks the stack, it must eventually unlock it using the End_Use_Locked_PM_Stack service.
For Windows 95, the size of the protected-mode locked stack is 4K bytes.
Begin_Nest_Exec, End_Use_Locked_PM_Stack