Converts the calling thread into a user-mode scheduling (UMS) scheduler thread.
BOOL EnterUmsSchedulingMode( PUMS_SCHEDULER_STARTUP_INFO SchedulerStartupInfo );
If the function succeeds, it returns a nonzero value.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
An application's UMS scheduler creates one UMS scheduler thread for each processor that will be used to run UMS threads. The scheduler typically sets the affinity of the scheduler thread for a single processor, effectively reserving the processor for the use of that scheduler thread. For more information about thread affinity, see Multiple Processors.
When a UMS scheduler thread is created, the system calls the UmsSchedulerProc entry point function specified with the EnterUmsSchedulingMode function call. The application's scheduler is responsible for finishing any application-specific initialization of the scheduler thread and selecting a UMS worker thread to run.
The application's scheduler selects a UMS worker thread to run by calling ExecuteUmsThread with the worker thread's UMS thread context. The worker thread runs until it yields control by calling UmsThreadYield, blocks, or terminates. The scheduler thread is then available to run another worker thread.
A scheduler thread should continue to run until all of its worker threads reach a natural stopping point: that is, all worker threads have yielded, blocked, or terminated.
|Minimum supported client||Windows 7 (64-bit only) [desktop apps only]|
|Minimum supported server||Windows Server 2008 R2 [desktop apps only]|
|Header||winbase.h (include Windows.h)|