diff options
-rw-r--r-- | docs/users_guide/8.12.1-notes.rst | 3 | ||||
-rw-r--r-- | hadrian/src/Settings/Packages.hs | 2 | ||||
-rw-r--r-- | rts/ghc.mk | 2 | ||||
-rw-r--r-- | rts/win32/OSThreads.c | 56 |
4 files changed, 10 insertions, 53 deletions
diff --git a/docs/users_guide/8.12.1-notes.rst b/docs/users_guide/8.12.1-notes.rst index d7abe39bd6..8f5d5db439 100644 --- a/docs/users_guide/8.12.1-notes.rst +++ b/docs/users_guide/8.12.1-notes.rst @@ -114,6 +114,9 @@ Runtime system in the process's affinity mask, making GHC's behavior more predictable in containerized settings (:ghc-ticket:`14781`). +- Support for Windows Vista has been dropped. GHC-compiled programs now require + Windows 7 or later. + Template Haskell ~~~~~~~~~~~~~~~~ diff --git a/hadrian/src/Settings/Packages.hs b/hadrian/src/Settings/Packages.hs index 210f1c829c..2af29eaaff 100644 --- a/hadrian/src/Settings/Packages.hs +++ b/hadrian/src/Settings/Packages.hs @@ -462,4 +462,4 @@ rtsWarnings = mconcat -- and also centralizes the versioning. -- | Minimum supported Windows version. windowsVersion :: String -windowsVersion = "0x06000100" +windowsVersion = "0x06010000" diff --git a/rts/ghc.mk b/rts/ghc.mk index 451b1912cb..7e7747b485 100644 --- a/rts/ghc.mk +++ b/rts/ghc.mk @@ -25,7 +25,7 @@ rts_VERSION = 1.0 # If we're compiling on windows, enforce that we only support Vista SP1+ # Adding this here means it doesn't have to be done in individual .c files # and also centralizes the versioning. -rts_WINVER = 0x06000100 +rts_WINVER = 0x06010000 # merge GhcLibWays and GhcRTSWays but strip out duplicates rts_WAYS = $(GhcLibWays) $(filter-out $(GhcLibWays),$(GhcRTSWays)) diff --git a/rts/win32/OSThreads.c b/rts/win32/OSThreads.c index 0942382da2..fe35f35e82 100644 --- a/rts/win32/OSThreads.c +++ b/rts/win32/OSThreads.c @@ -252,17 +252,6 @@ forkOS_createThread ( HsStablePtr entry ) (unsigned*)&pId) == 0); } -#if defined(x86_64_HOST_ARCH) -/* We still support Windows Vista, so we can't depend on it - and must manually resolve these. */ -typedef DWORD(WINAPI *GetItemCountProc)(WORD); -typedef DWORD(WINAPI *GetGroupCountProc)(void); -typedef BOOL(WINAPI *SetThreadGroupAffinityProc)(HANDLE, const GROUP_AFFINITY*, PGROUP_AFFINITY); -#if !defined(ALL_PROCESSOR_GROUPS) -#define ALL_PROCESSOR_GROUPS 0xffff -#endif -#endif - void freeThreadingResources (void) { if (cpuGroupCache) @@ -310,13 +299,6 @@ getNumberOfProcessorsGroups (void) #if defined(x86_64_HOST_ARCH) if (!n_groups) { - /* We still support Windows Vista. Which means we can't rely - on the API being available. So we'll have to resolve manually. */ - HMODULE kernel = GetModuleHandleW(L"kernel32"); - - GetGroupCountProc GetActiveProcessorGroupCount - = (GetGroupCountProc)(void*) - GetProcAddress(kernel, "GetActiveProcessorGroupCount"); n_groups = GetActiveProcessorGroupCount(); IF_DEBUG(scheduler, debugBelch("[*] Number of processor groups detected: %u\n", n_groups)); @@ -346,21 +328,10 @@ getProcessorsDistribution (void) cpuGroupDistCache = malloc(n_groups * sizeof(uint8_t)); memset(cpuGroupDistCache, MAXIMUM_PROCESSORS, n_groups * sizeof(uint8_t)); - /* We still support Windows Vista. Which means we can't rely - on the API being available. So we'll have to resolve manually. */ - HMODULE kernel = GetModuleHandleW(L"kernel32"); - - GetItemCountProc GetActiveProcessorCount - = (GetItemCountProc)(void*) - GetProcAddress(kernel, "GetActiveProcessorCount"); - - if (GetActiveProcessorCount) + for (int i = 0; i < n_groups; i++) { - for (int i = 0; i < n_groups; i++) - { - cpuGroupDistCache[i] = GetActiveProcessorCount(i); - IF_DEBUG(scheduler, debugBelch("[*] Number of active processors in group %u detected: %u\n", i, cpuGroupDistCache[i])); - } + cpuGroupDistCache[i] = GetActiveProcessorCount(i); + IF_DEBUG(scheduler, debugBelch("[*] Number of active processors in group %u detected: %u\n", i, cpuGroupDistCache[i])); } } @@ -449,14 +420,7 @@ getNumberOfProcessors (void) static uint32_t nproc = 0; #if defined(x86_64_HOST_ARCH) - /* We still support Windows Vista. Which means we can't rely - on the API being available. So we'll have to resolve manually. */ - HMODULE kernel = GetModuleHandleW(L"kernel32"); - - GetItemCountProc GetActiveProcessorCount - = (GetItemCountProc)(void*) - GetProcAddress(kernel, "GetActiveProcessorCount"); - if (GetActiveProcessorCount && !nproc) + if (!nproc) { nproc = GetActiveProcessorCount(ALL_PROCESSOR_GROUPS); @@ -517,21 +481,11 @@ setThreadAffinity (uint32_t n, uint32_t m) // cap N of M mask[group] |= 1 << ix; } -#if defined(x86_64_HOST_ARCH) - /* We still support Windows Vista. Which means we can't rely - on the API being available. So we'll have to resolve manually. */ - HMODULE kernel = GetModuleHandleW(L"kernel32"); - - SetThreadGroupAffinityProc SetThreadGroupAffinity - = (SetThreadGroupAffinityProc)(void*) - GetProcAddress(kernel, "SetThreadGroupAffinity"); -#endif - for (i = 0; i < n_groups; i++) { #if defined(x86_64_HOST_ARCH) // If we support the new API, use it. - if (mask[i] > 0 && SetThreadGroupAffinity) + if (mask[i] > 0) { GROUP_AFFINITY hGroup; ZeroMemory(&hGroup, sizeof(hGroup)); |