Skip to content

Commit 851fbd3

Browse files
authored
Merge pull request #573 from compnerd/5.5-slpi-22000
shims: adjust the SLPI enumeration for Windows 11
2 parents f9fdaee + 55aa133 commit 851fbd3

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

CMakeLists.txt

+14
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,20 @@ int main(int argc, char *argv[]) {
4040
if(DISPATCH_HAVE_EXTENDED_SLPI_20348)
4141
add_compile_definitions(DISPATCH_HAVE_EXTENDED_SLPI_20348)
4242
endif()
43+
44+
check_c_source_compiles([=[
45+
#include <Windows.h>
46+
int main(int argc, char *argv[]) {
47+
switch ((LOGICAL_PROCESSOR_RELATIONSHIP)0) {
48+
case RelationProcessorModule:
49+
return 0;
50+
}
51+
return 0;
52+
}
53+
]=] DISPATCH_HAVE_EXTENDED_SLPI_22000)
54+
if(DISPATCH_HAVE_EXTENDED_SLPI_22000)
55+
add_compile_definitions(DISPATCH_HAVE_EXTENDED_SLPI_22000)
56+
endif()
4357
endif()
4458

4559
set(CMAKE_C_STANDARD 11)

src/shims/hw_config.h

+3
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ _dispatch_hw_get_config(_dispatch_hw_config_t c)
166166
#endif
167167
case RelationCache:
168168
case RelationGroup:
169+
#if defined(DISPATCH_HAVE_EXTENDED_SLPI_22000)
170+
case RelationProcessorModule:
171+
#endif
169172
case RelationAll:
170173
break;
171174
}

0 commit comments

Comments
 (0)