Call_When_Task_Switched

include vmm.inc

mov     esi, OFFSET32 TaskSwitchCallback
VMMCall Call_When_Task_Switched
 

Installs a task-switched callback function which the system calls whenever it carries out a task switch. This service should be used sparingly, and the callback function should be optimized for speed.

TaskSwitchCallback
Address of the callback function to install. For more information about the callback function, see TaskSwitchCallback.

Some virtual devices must save the state of a hardware device every time a task switch occurs and restore the hardware state for the virtual machine that is about to be run. However, virtual machine events can often be used in place of using this service.

Virtual devices can install any number of callback functions. The system calls each one in the order installed, until all functions have been called.

See Also

Call_When_Idle, Call_When_Not_Critical, Call_When_Thread_Switched, Cancel_Call_When_Task_Switched, TaskSwitchCallback