Skip to content

Commit e734ead

Browse files
Merge pull request #988 from gipittal/docs
Multigroup affinities - Update usermode affinity API docs
2 parents f1254b0 + 9dc3b7e commit e734ead

12 files changed

+35
-16
lines changed

sdk-api-src/content/processthreadsapi/nf-processthreadsapi-getprocessdefaultcpusetmasks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ req.lib:
1919
req.max-support:
2020
req.namespace:
2121
req.redist:
22-
req.target-min-winverclnt: Windows 10 Build 20348
23-
req.target-min-winversvr: Windows 10 Build 20348
22+
req.target-min-winverclnt: Windows 11
23+
req.target-min-winversvr: Windows Server 2022
2424
req.target-type:
2525
req.type-library:
2626
req.umdf-ver:

sdk-api-src/content/processthreadsapi/nf-processthreadsapi-getthreadselectedcpusetmasks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ req.lib:
1919
req.max-support:
2020
req.namespace:
2121
req.redist:
22-
req.target-min-winverclnt: Windows 10 Build 20348
23-
req.target-min-winversvr: Windows 10 Build 20348
22+
req.target-min-winverclnt: Windows 11
23+
req.target-min-winversvr: Windows Server 2022
2424
req.target-type:
2525
req.type-library:
2626
req.umdf-ver:

sdk-api-src/content/processthreadsapi/nf-processthreadsapi-setprocessdefaultcpusetmasks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ req.lib:
1919
req.max-support:
2020
req.namespace:
2121
req.redist:
22-
req.target-min-winverclnt: Windows 10 Build 20348
23-
req.target-min-winversvr: Windows 10 Build 20348
22+
req.target-min-winverclnt: Windows 11
23+
req.target-min-winversvr: Windows Server 2022
2424
req.target-type:
2525
req.type-library:
2626
req.umdf-ver:

sdk-api-src/content/processthreadsapi/nf-processthreadsapi-setthreadidealprocessor.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ You can use the <a href="/windows/desktop/api/sysinfoapi/nf-sysinfoapi-getsystem
8888
<b>GetProcessAffinityMask</b> returns a bitmask whereas
8989
<b>SetThreadIdealProcessor</b> uses an integer value to represent the processor.
9090

91+
Starting with Windows 11 and Windows Server 2022, on a system with more than 64 processors, process and thread affinities span all processors in the system, across all <a href="/windows/desktop/ProcThread/processor-groups">processor groups</a>, by default.
92+
The <b>SetThreadIdealProcessor</b> function sets the preferred processor to a logical processor in the thread's primary group.
93+
9194
To compile an application that uses this function, define _WIN32_WINNT as 0x0400 or later. For more information, see
9295
<a href="/windows/desktop/WinProg/using-the-windows-headers">Using the Windows Headers</a>.
9396

@@ -123,4 +126,4 @@ To compile an application that uses this function, define _WIN32_WINNT as 0x0400
123126

124127

125128

126-
<a href="/windows/desktop/ProcThread/multiple-threads">Threads</a>
129+
<a href="/windows/desktop/ProcThread/multiple-threads">Threads</a>

sdk-api-src/content/processthreadsapi/nf-processthreadsapi-setthreadidealprocessorex.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ If the function fails, it returns zero. To get extended error information, use <
8282

8383
Specifying a thread ideal processor provides a hint to the scheduler about the preferred processor for a thread. The scheduler runs the thread on the thread's ideal processor when possible.
8484

85+
Starting with Windows 11 and Windows Server 2022, on a system with more than 64 processors, process and thread affinities span all processors in the system, across all <a href="/windows/desktop/ProcThread/processor-groups">processor groups</a>, by default.
86+
The <b>SetThreadIdealProcessorEx</b>, in setting the preferred processor, also sets the thread's primary group to the group of the preferred processor.
87+
8588
To compile an application that uses this function, set _WIN32_WINNT &gt;= 0x0601. For more information, see <a href="/windows/desktop/WinProg/using-the-windows-headers">Using the Windows Headers</a>.
8689

8790
<b>Windows Phone 8.1:</b> This function is supported for Windows Phone Store apps on Windows Phone 8.1 and later.
@@ -94,4 +97,4 @@ To compile an application that uses this function, set _WIN32_WINNT &gt;= 0x0601
9497

9598

9699

97-
<a href="/windows/desktop/api/processthreadsapi/nf-processthreadsapi-setthreadidealprocessor">SetThreadIdealProcessor</a>
100+
<a href="/windows/desktop/api/processthreadsapi/nf-processthreadsapi-setthreadidealprocessor">SetThreadIdealProcessor</a>

sdk-api-src/content/processthreadsapi/nf-processthreadsapi-setthreadselectedcpusetmasks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ req.lib:
1919
req.max-support:
2020
req.namespace:
2121
req.redist:
22-
req.target-min-winverclnt: Windows 10 Build 20348
23-
req.target-min-winversvr: Windows 10 Build 20348
22+
req.target-min-winverclnt: Windows 11
23+
req.target-min-winversvr: Windows Server 2022
2424
req.target-type:
2525
req.type-library:
2626
req.umdf-ver:

sdk-api-src/content/processtopologyapi/nf-processtopologyapi-getprocessgroupaffinity.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ If the error value is ERROR_INSUFFICIENT_BUFFER, the <i>GroupCount</i> parameter
8383

8484
## -remarks
8585

86+
Starting with Windows 11 and Windows Server 2022, on a system with more than 64 processors, process and thread affinities span all processors in the system, across all <a href="/windows/desktop/ProcThread/processor-groups">processor groups</a>, by default.
87+
8688
To compile an application that uses this function, set _WIN32_WINNT &gt;= 0x0601. For more information, see <a href="/windows/desktop/WinProg/using-the-windows-headers">Using the Windows Headers</a>.
8789

8890
## -see-also
@@ -91,4 +93,4 @@ To compile an application that uses this function, set _WIN32_WINNT &gt;= 0x0601
9193

9294

9395

94-
<a href="/windows/desktop/ProcThread/processor-groups">Processor Groups</a>
96+
<a href="/windows/desktop/ProcThread/processor-groups">Processor Groups</a>

sdk-api-src/content/processtopologyapi/nf-processtopologyapi-getthreadgroupaffinity.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ If the function fails, the return value is zero. To get extended error informati
7777

7878
## -remarks
7979

80+
Starting with Windows 11 and Windows Server 2022, on a system with more than 64 processors, process and thread affinities span all processors in the system, across all <a href="/windows/desktop/ProcThread/processor-groups">processor groups</a>, by default. The <b>GetThreadGroupAffinity</b> function retrieves the group affinity over the thread's primary group.
81+
8082
To compile an application that uses this function, set _WIN32_WINNT &gt;= 0x0601. For more information, see <a href="/windows/desktop/WinProg/using-the-windows-headers">Using the Windows Headers</a>.
8183

8284
## -see-also
@@ -85,4 +87,4 @@ To compile an application that uses this function, set _WIN32_WINNT &gt;= 0x0601
8587

8688

8789

88-
<a href="/windows/desktop/ProcThread/processor-groups">Processor Groups</a>
90+
<a href="/windows/desktop/ProcThread/processor-groups">Processor Groups</a>

sdk-api-src/content/processtopologyapi/nf-processtopologyapi-setthreadgroupaffinity.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,11 @@ If the function fails, the return value is zero. To get extended error informati
8181

8282
## -remarks
8383

84+
Starting with Windows 11 and Windows Server 2022, on a system with more than 64 processors, process and thread affinities span all processors in the system, across all <a href="/windows/desktop/ProcThread/processor-groups">processor groups</a>, by default.
85+
The <b>SetThreadGroupAffinity</b> function restricts a thread's affinity to the processors over the single processor group specified by the given <i>GroupAffinity</i>. This group will also become the thread's primary group.
86+
8487
To compile an application that uses this function, set _WIN32_WINNT &gt;= 0x0601. For more information, see <a href="/windows/desktop/WinProg/using-the-windows-headers">Using the Windows Headers</a>.
8588

8689
## -see-also
8790

88-
<a href="/windows/desktop/api/winnt/ns-winnt-group_affinity">GROUP_AFFINITY</a>
91+
<a href="/windows/desktop/api/winnt/ns-winnt-group_affinity">GROUP_AFFINITY</a>

sdk-api-src/content/winbase/nf-winbase-getprocessaffinitymask.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ A process affinity mask is a bit vector in which each bit represents the process
9090

9191
A process affinity mask is a subset of the system affinity mask. A process is only allowed to run on the processors configured into a system. Therefore, the process affinity mask cannot specify a 1 bit for a processor when the system affinity mask specifies a 0 bit for that processor.
9292

93+
Starting with Windows 11 and Windows Server 2022, on a system with more than 64 processors, process and thread affinities span all processors in the system, across all <a href="/windows/desktop/ProcThread/processor-groups">processor groups</a>, by default. The <b>GetProcessAffinityMask</b> function sets the <i>lpProcessAffinityMask</i> and <i>lpSystemAffinityMask</i> to the process and system processor masks over the process' primary group. If the process had explicitly set the affinity of one or more of its threads outside of the process' primary group, the function returns zero for both affinity masks. If, however, <i>hHandle</i> specifies a handle to the current process, the function always uses the calling thread's primary group (which by default is the same as the process' primary group) in order to set the <i>lpProcessAffinityMask</i> and <i>lpSystemAffinityMask</i>.
94+
9395
## -see-also
9496

9597
<a href="/windows/desktop/ProcThread/multiple-processors">Multiple Processors</a>
@@ -112,4 +114,4 @@ A process affinity mask is a subset of the system affinity mask. A process is on
112114

113115

114116

115-
<a href="/windows/desktop/api/winbase/nf-winbase-setthreadaffinitymask">SetThreadAffinityMask</a>
117+
<a href="/windows/desktop/api/winbase/nf-winbase-setthreadaffinitymask">SetThreadAffinityMask</a>

sdk-api-src/content/winbase/nf-winbase-setprocessaffinitymask.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ Do not call <b>SetProcessAffinityMask</b> in a DLL that may be called by process
9191

9292
On a system with more than 64 processors, the <b>SetProcessAffinityMask</b> function can be used to set the process affinity mask only for processes with threads in a single <a href="/windows/desktop/ProcThread/processor-groups">processor group</a>. Use the <a href="/windows/desktop/api/winbase/nf-winbase-setthreadaffinitymask">SetThreadAffinityMask</a> function to set the affinity mask for individual threads in multiple groups. This effectively changes the group assignment of the process.
9393

94+
Starting with Windows 11 and Windows Server 2022, on a system with more than 64 processors, process and thread affinities span all processors in the system, across all processor groups, by default. Instead of always failing in case the calling process contains threads in more than one processor group, the <b>SetProcessAffinityMask</b> function fails (returning zero with <b>ERROR_INVALID_PARAMETER</b> last error code) if the process had explicitly set the affinity of one or more of its threads outside of the process' <a href="/windows/desktop/ProcThread/processor-groups">primary group</a>.
95+
9496
## -see-also
9597

9698
<a href="/windows/desktop/api/processthreadsapi/nf-processthreadsapi-createprocessa">CreateProcess</a>
@@ -117,4 +119,4 @@ On a system with more than 64 processors, the <b>SetProcessAffinityMask</b> func
117119

118120

119121

120-
<a href="/windows/desktop/api/winbase/nf-winbase-setthreadaffinitymask">SetThreadAffinityMask</a>
122+
<a href="/windows/desktop/api/winbase/nf-winbase-setthreadaffinitymask">SetThreadAffinityMask</a>

sdk-api-src/content/winbase/nf-winbase-setthreadaffinitymask.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ Setting an affinity mask for a process or thread can result in threads receiving
9090

9191
If the new thread affinity mask does not specify the processor that is currently running the thread, the thread is rescheduled on one of the allowable processors.
9292

93+
Starting with Windows 11 and Windows Server 2022, on a system with more than 64 processors, process and thread affinities span all processors in the system, across all <a href="/windows/desktop/ProcThread/processor-groups">processor groups</a>, by default. The <i>dwThreadAffinityMask</i> must specify processors in the thread's current primary group.
94+
9395
## -see-also
9496

9597
<a href="/windows/desktop/api/winbase/nf-winbase-getprocessaffinitymask">GetProcessAffinityMask</a>
@@ -120,4 +122,4 @@ If the new thread affinity mask does not specify the processor that is currently
120122

121123

122124

123-
<a href="/windows/desktop/ProcThread/multiple-threads">Threads</a>
125+
<a href="/windows/desktop/ProcThread/multiple-threads">Threads</a>

0 commit comments

Comments
 (0)