SetThreadSelectedCpuSets function

Sets the selected CPU Sets assignment for the specified thread. This assignment overrides the process default assignment, if one is set.

Syntax

BOOL WINAPI SetThreadSelectedCpuSets(
  _In_       HANDLE Thread,
  _In_ const ULONG  *CpuSetIds,
  _In_       ULONG  CpuSetIdCount
);

Parameters

Thread [in]

Specifies the thread on which to set the CPU Set assignment. This handle must have the THREAD_SET_LIMITED_INFORMATION access right. The value returned by GetCurrentThread can also be used.

CpuSetIds [in]

Specifies the list of CPU Set IDs to set as the thread selected CPU set. If this is NULL, the API clears out any assignment, reverting to process default assignment if one is set.

CpuSetIdCount [in]

Specifies the number of IDs in the list passed in the CpuSetIds argument. If that value is NULL, this should be 0.

Return value

This function cannot fail when passed valid parameters.

Requirements

Minimum supported client
Windows 10 [desktop apps | UWP apps]
Minimum supported server
Windows Server 2016 [desktop apps | UWP apps]
Header
Processthreadapi.h
Library
Windows.h
DLL
Kernel32.dll