CeSetThreadAffinity (Compact 2013)
This function sets a processor affinity for the specified thread.
BOOL WINAPI CeSetThreadAffinity ( HANDLE hThread, DWORD dwProcessor );
[in] Handle to the thread whose affinity mask is to be set.
[in] Processor to set the affinity of the thread to. Set to zero if no affinity is to be set.
TRUE indicates success. FALSE indicates failure. Call GetLastError to obtain extended error information.
Setting an affinity for a process or thread can result in threads receiving less processor time, as the system is restricted from running the threads on certain processors. In most cases, it is better to let the system select an available processor.
If the new thread affinity does not specify the processor that is currently running the thread, the thread is rescheduled on one of the available processors.