include vmm.inc
mov eax, PriorityBoost
mov edi, ThreadHandle
VMMCall Adjust_Thread_Exec_Priority
Raises or lowers the execution priority of the specified thread. The service adds the specified boost to the thread's current execution priority. Uses Flags.
Value | Meaning |
---|---|
Reserved_Low_Boost | Reserved for use by system. |
Cur_Run_VM_Boost | Use to boost the priority of each thread, in turn, forcing them to run for their allotted timeslices. |
Low_Pri_Device_Boost | Use for operations that need timely processing but are not time critical. |
High_Pri_Device_Boost | Use for time-critical operations that should not circumvent the critical section boost. |
Critical_Section_Boost | Use to boost the priority of the thread whenever it enters a critical section (calls Begin_Critical_Section). |
Time_Critical_Boost | Use for operations that require immediate processing, even when another thread is in a critical section. For example, VPICD uses this when simulating hardware interrupts. |
Reserved_High_Boost | Reserved for use by system. |
Because the nonsuspended thread with the highest execution priority is always the current thread, this service causes a task switch under two circumstances:
Even if the current thread is in a critical section, a task switch will still occur if the priority of another nonsuspended thread is raised higher than the current thread's priority. However, this will only occur when a thread is given a time-critical boost, for example, to simulate a hardware interrupt.
It is often more convenient to call the Call_Priority_VM_Event service than to call this service directly.
Adjust_Exec_Priority, Begin_Critical_Section, Call_Priority_VM_Event