Windows Driver Kit: Kernel-Mode Driver Architecture
KeSetSystemAffinityThread
The KeSetSystemAffinityThread routine sets the system affinity of the current thread.
VOID
KeSetSystemAffinityThread(
IN KAFFINITY Affinity
);
Parameters
- Affinity
- A KAFFINITY-typed variable that specifies the new system affinity of the current thread.
Return Value
None
Comments
The implementation of KeSetSystemAffinityThread in Windows 7 and later versions of Windows provides compatibility for drivers that were written for earlier versions of Windows, which do not support processor groups. In this implementation, KeSetSystemAffinityThread assigns the thread to group 0, and uses the affinity mask to specify a set of logical processors in this group on which the thread can run.
Requirements
Versions: Available in Windows 2000 and later versions of the Windows operating system. Use KeSetSystemAffinityThread only on systems before Windows Vista. In Windows Vista and later versions of the Windows operating system, use KeSetSystemAffinityThreadEx instead.
IRQL: <= DISPATCH_LEVEL
Headers: Declared in Wdm.h. Include Wdm.h.
See Also
KAFFINITY, KeSetSystemAffinityThreadEx