Skip to content

Commit

Permalink
Merge pull request #573 from compnerd/5.5-slpi-22000
Browse files Browse the repository at this point in the history
shims: adjust the SLPI enumeration for Windows 11
  • Loading branch information
compnerd authored Sep 17, 2021
2 parents f9fdaee + 55aa133 commit 851fbd3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ int main(int argc, char *argv[]) {
if(DISPATCH_HAVE_EXTENDED_SLPI_20348)
add_compile_definitions(DISPATCH_HAVE_EXTENDED_SLPI_20348)
endif()

check_c_source_compiles([=[
#include <Windows.h>
int main(int argc, char *argv[]) {
switch ((LOGICAL_PROCESSOR_RELATIONSHIP)0) {
case RelationProcessorModule:
return 0;
}
return 0;
}
]=] DISPATCH_HAVE_EXTENDED_SLPI_22000)
if(DISPATCH_HAVE_EXTENDED_SLPI_22000)
add_compile_definitions(DISPATCH_HAVE_EXTENDED_SLPI_22000)
endif()
endif()

set(CMAKE_C_STANDARD 11)
Expand Down
3 changes: 3 additions & 0 deletions src/shims/hw_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ _dispatch_hw_get_config(_dispatch_hw_config_t c)
#endif
case RelationCache:
case RelationGroup:
#if defined(DISPATCH_HAVE_EXTENDED_SLPI_22000)
case RelationProcessorModule:
#endif
case RelationAll:
break;
}
Expand Down

0 comments on commit 851fbd3

Please sign in to comment.