aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/export_windows_test.go
diff options
context:
space:
mode:
authorqmuntal <quimmuntal@gmail.com>2023-01-30 14:42:17 +0100
committerDamien Neil <dneil@google.com>2023-01-31 22:06:41 +0000
commita17d959debdb04cd550016a3501dd09d50cd62e7 (patch)
tree3fd64a6cfada925520bf0a915f1389a47f1c5552 /src/runtime/export_windows_test.go
parent34d026862df50e36bdb74f010f746f91b7d6a052 (diff)
downloadgo-a17d959debdb04cd550016a3501dd09d50cd62e7.tar.xz
runtime: always use LoadLibraryEx to load system libraries
This CL removes a fallback that used LoadLibraryA when the runtime was loading system DLLs on Windows 7, Windows Server 2008 R2, or earlier. We can safely remove that fallback now, as go1.21 will require at least Windows 8 or Server 2012. This CL also saves some syscall initialization time and bytes: new: init syscall @2.3 ms, 0 ms clock, 1000 bytes, 18 allocs old: init syscall @3.6 ms, 0.52 ms clock, 1744 bytes, 24 allocs Updates #57003 Change-Id: I7dcc1173537785b6b580e9f78632c0c74da658d4 Reviewed-on: https://go-review.googlesource.com/c/go/+/463842 Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Quim Muntal <quimmuntal@gmail.com> Reviewed-by: Damien Neil <dneil@google.com>
Diffstat (limited to 'src/runtime/export_windows_test.go')
-rw-r--r--src/runtime/export_windows_test.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/runtime/export_windows_test.go b/src/runtime/export_windows_test.go
index d9cf753463..d4b1e1fad3 100644
--- a/src/runtime/export_windows_test.go
+++ b/src/runtime/export_windows_test.go
@@ -21,7 +21,3 @@ func NumberOfProcessors() int32 {
stdcall1(_GetSystemInfo, uintptr(unsafe.Pointer(&info)))
return int32(info.dwnumberofprocessors)
}
-
-func LoadLibraryExStatus() (useEx, haveEx, haveFlags bool) {
- return useLoadLibraryEx, _LoadLibraryExW != nil, _AddDllDirectory != nil
-}