Expand Minimize

KeSetSystemAffinityThread routine

The KeSetSystemAffinityThread routine sets the system affinity of the current thread.

Syntax


VOID KeSetSystemAffinityThread(
  _In_  KAFFINITY Affinity
);

Parameters

Affinity [in]

A KAFFINITY-typed variable that specifies the new system affinity of the current thread.

Return value

None

Remarks

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.

If KeSetSystemAffinityThread is called at IRQL <= APC_LEVEL and the call is successful, the new affinity mask takes effect immediately. When the call returns, the calling thread is already running on a processor that is specified in the new affinity mask. If KeSetSystemAffinityThread is called at IRQL = DISPATCH_LEVEL and the call is successful, the pending processor change is deferred until the caller lowers the IRQL below DISPATCH_LEVEL.

Requirements

Version

Available in Windows 2000 and later versions of Windows. Use KeSetSystemAffinityThread only on systems before Windows Vista. In Windows Vista and later versions of the Windows operating system, use KeSetSystemAffinityThreadEx instead.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

<= DISPATCH_LEVEL (see Remarks section).

DDI compliance rules

PowerIrpDDis, HwStorPortProhibitedDDIs

See also

KAFFINITY
KeSetSystemAffinityThreadEx

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft