Commit 4a2233ce authored by Alex Brainman's avatar Alex Brainman

runtime: move all stdFunctions into os1_windows.go (no code changes)

Change-Id: I40291561a18bed3ca6be9dca12a664bdf28cb2f1
Reviewed-on: https://go-review.googlesource.com/4660Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent f984cea7
...@@ -18,16 +18,6 @@ const ( ...@@ -18,16 +18,6 @@ const (
_PAGE_NOACCESS = 0x0001 _PAGE_NOACCESS = 0x0001
) )
//go:cgo_import_dynamic runtime._VirtualAlloc VirtualAlloc "kernel32.dll"
//go:cgo_import_dynamic runtime._VirtualFree VirtualFree "kernel32.dll"
//go:cgo_import_dynamic runtime._VirtualProtect VirtualProtect "kernel32.dll"
var (
_VirtualAlloc,
_VirtualFree,
_VirtualProtect stdFunction
)
//go:nosplit //go:nosplit
func sysAlloc(n uintptr, stat *uint64) unsafe.Pointer { func sysAlloc(n uintptr, stat *uint64) unsafe.Pointer {
xadd64(stat, int64(n)) xadd64(stat, int64(n))
......
...@@ -10,16 +10,6 @@ import ( ...@@ -10,16 +10,6 @@ import (
const _DWORD_MAX = 0xffffffff const _DWORD_MAX = 0xffffffff
//go:cgo_import_dynamic runtime._CreateIoCompletionPort CreateIoCompletionPort "kernel32.dll"
//go:cgo_import_dynamic runtime._GetQueuedCompletionStatus GetQueuedCompletionStatus "kernel32.dll"
//go:cgo_import_dynamic runtime._WSAGetOverlappedResult WSAGetOverlappedResult "ws2_32.dll"
var (
_CreateIoCompletionPort,
_GetQueuedCompletionStatus,
_WSAGetOverlappedResult stdFunction
)
const _INVALID_HANDLE_VALUE = ^uintptr(0) const _INVALID_HANDLE_VALUE = ^uintptr(0)
// net_op must be the same as beginning of net.operation. Keep these in sync. // net_op must be the same as beginning of net.operation. Keep these in sync.
......
...@@ -11,6 +11,7 @@ import ( ...@@ -11,6 +11,7 @@ import (
//go:cgo_import_dynamic runtime._AddVectoredExceptionHandler AddVectoredExceptionHandler "kernel32.dll" //go:cgo_import_dynamic runtime._AddVectoredExceptionHandler AddVectoredExceptionHandler "kernel32.dll"
//go:cgo_import_dynamic runtime._CloseHandle CloseHandle "kernel32.dll" //go:cgo_import_dynamic runtime._CloseHandle CloseHandle "kernel32.dll"
//go:cgo_import_dynamic runtime._CreateEventA CreateEventA "kernel32.dll" //go:cgo_import_dynamic runtime._CreateEventA CreateEventA "kernel32.dll"
//go:cgo_import_dynamic runtime._CreateIoCompletionPort CreateIoCompletionPort "kernel32.dll"
//go:cgo_import_dynamic runtime._CreateThread CreateThread "kernel32.dll" //go:cgo_import_dynamic runtime._CreateThread CreateThread "kernel32.dll"
//go:cgo_import_dynamic runtime._CreateWaitableTimerA CreateWaitableTimerA "kernel32.dll" //go:cgo_import_dynamic runtime._CreateWaitableTimerA CreateWaitableTimerA "kernel32.dll"
//go:cgo_import_dynamic runtime._CryptAcquireContextW CryptAcquireContextW "advapi32.dll" //go:cgo_import_dynamic runtime._CryptAcquireContextW CryptAcquireContextW "advapi32.dll"
...@@ -21,6 +22,7 @@ import ( ...@@ -21,6 +22,7 @@ import (
//go:cgo_import_dynamic runtime._FreeEnvironmentStringsW FreeEnvironmentStringsW "kernel32.dll" //go:cgo_import_dynamic runtime._FreeEnvironmentStringsW FreeEnvironmentStringsW "kernel32.dll"
//go:cgo_import_dynamic runtime._GetEnvironmentStringsW GetEnvironmentStringsW "kernel32.dll" //go:cgo_import_dynamic runtime._GetEnvironmentStringsW GetEnvironmentStringsW "kernel32.dll"
//go:cgo_import_dynamic runtime._GetProcAddress GetProcAddress "kernel32.dll" //go:cgo_import_dynamic runtime._GetProcAddress GetProcAddress "kernel32.dll"
//go:cgo_import_dynamic runtime._GetQueuedCompletionStatus GetQueuedCompletionStatus "kernel32.dll"
//go:cgo_import_dynamic runtime._GetStdHandle GetStdHandle "kernel32.dll" //go:cgo_import_dynamic runtime._GetStdHandle GetStdHandle "kernel32.dll"
//go:cgo_import_dynamic runtime._GetSystemInfo GetSystemInfo "kernel32.dll" //go:cgo_import_dynamic runtime._GetSystemInfo GetSystemInfo "kernel32.dll"
//go:cgo_import_dynamic runtime._GetThreadContext GetThreadContext "kernel32.dll" //go:cgo_import_dynamic runtime._GetThreadContext GetThreadContext "kernel32.dll"
...@@ -37,6 +39,10 @@ import ( ...@@ -37,6 +39,10 @@ import (
//go:cgo_import_dynamic runtime._SetWaitableTimer SetWaitableTimer "kernel32.dll" //go:cgo_import_dynamic runtime._SetWaitableTimer SetWaitableTimer "kernel32.dll"
//go:cgo_import_dynamic runtime._Sleep Sleep "kernel32.dll" //go:cgo_import_dynamic runtime._Sleep Sleep "kernel32.dll"
//go:cgo_import_dynamic runtime._SuspendThread SuspendThread "kernel32.dll" //go:cgo_import_dynamic runtime._SuspendThread SuspendThread "kernel32.dll"
//go:cgo_import_dynamic runtime._VirtualAlloc VirtualAlloc "kernel32.dll"
//go:cgo_import_dynamic runtime._VirtualFree VirtualFree "kernel32.dll"
//go:cgo_import_dynamic runtime._VirtualProtect VirtualProtect "kernel32.dll"
//go:cgo_import_dynamic runtime._WSAGetOverlappedResult WSAGetOverlappedResult "ws2_32.dll"
//go:cgo_import_dynamic runtime._WaitForSingleObject WaitForSingleObject "kernel32.dll" //go:cgo_import_dynamic runtime._WaitForSingleObject WaitForSingleObject "kernel32.dll"
//go:cgo_import_dynamic runtime._WriteFile WriteFile "kernel32.dll" //go:cgo_import_dynamic runtime._WriteFile WriteFile "kernel32.dll"
//go:cgo_import_dynamic runtime._timeBeginPeriod timeBeginPeriod "winmm.dll" //go:cgo_import_dynamic runtime._timeBeginPeriod timeBeginPeriod "winmm.dll"
...@@ -48,6 +54,7 @@ var ( ...@@ -48,6 +54,7 @@ var (
_AddVectoredExceptionHandler, _AddVectoredExceptionHandler,
_CloseHandle, _CloseHandle,
_CreateEventA, _CreateEventA,
_CreateIoCompletionPort,
_CreateThread, _CreateThread,
_CreateWaitableTimerA, _CreateWaitableTimerA,
_CryptAcquireContextW, _CryptAcquireContextW,
...@@ -58,6 +65,7 @@ var ( ...@@ -58,6 +65,7 @@ var (
_FreeEnvironmentStringsW, _FreeEnvironmentStringsW,
_GetEnvironmentStringsW, _GetEnvironmentStringsW,
_GetProcAddress, _GetProcAddress,
_GetQueuedCompletionStatus,
_GetStdHandle, _GetStdHandle,
_GetSystemInfo, _GetSystemInfo,
_GetThreadContext, _GetThreadContext,
...@@ -74,6 +82,10 @@ var ( ...@@ -74,6 +82,10 @@ var (
_SetWaitableTimer, _SetWaitableTimer,
_Sleep, _Sleep,
_SuspendThread, _SuspendThread,
_VirtualAlloc,
_VirtualFree,
_VirtualProtect,
_WSAGetOverlappedResult,
_WaitForSingleObject, _WaitForSingleObject,
_WriteFile, _WriteFile,
_timeBeginPeriod stdFunction _timeBeginPeriod stdFunction
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment