$63 GRAYBYTE WORDPRESS FILE MANAGER $58

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/usr/lib/golang/src/runtime/

HOME
Current File : /usr/lib/golang/src/runtime//os_windows.go
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package runtime

import (
	"internal/abi"
	"internal/runtime/atomic"
	"internal/runtime/sys"
	"unsafe"
)

// TODO(brainman): should not need those
const (
	_NSIG = 65
)

//go:cgo_import_dynamic runtime._AddVectoredContinueHandler AddVectoredContinueHandler%2 "kernel32.dll"
//go:cgo_import_dynamic runtime._AddVectoredExceptionHandler AddVectoredExceptionHandler%2 "kernel32.dll"
//go:cgo_import_dynamic runtime._CloseHandle CloseHandle%1 "kernel32.dll"
//go:cgo_import_dynamic runtime._CreateEventA CreateEventA%4 "kernel32.dll"
//go:cgo_import_dynamic runtime._CreateIoCompletionPort CreateIoCompletionPort%4 "kernel32.dll"
//go:cgo_import_dynamic runtime._CreateThread CreateThread%6 "kernel32.dll"
//go:cgo_import_dynamic runtime._CreateWaitableTimerA CreateWaitableTimerA%3 "kernel32.dll"
//go:cgo_import_dynamic runtime._CreateWaitableTimerExW CreateWaitableTimerExW%4 "kernel32.dll"
//go:cgo_import_dynamic runtime._DuplicateHandle DuplicateHandle%7 "kernel32.dll"
//go:cgo_import_dynamic runtime._ExitProcess ExitProcess%1 "kernel32.dll"
//go:cgo_import_dynamic runtime._FreeEnvironmentStringsW FreeEnvironmentStringsW%1 "kernel32.dll"
//go:cgo_import_dynamic runtime._GetConsoleMode GetConsoleMode%2 "kernel32.dll"
//go:cgo_import_dynamic runtime._GetCurrentThreadId GetCurrentThreadId%0 "kernel32.dll"
//go:cgo_import_dynamic runtime._GetEnvironmentStringsW GetEnvironmentStringsW%0 "kernel32.dll"
//go:cgo_import_dynamic runtime._GetErrorMode GetErrorMode%0 "kernel32.dll"
//go:cgo_import_dynamic runtime._GetProcAddress GetProcAddress%2 "kernel32.dll"
//go:cgo_import_dynamic runtime._GetProcessAffinityMask GetProcessAffinityMask%3 "kernel32.dll"
//go:cgo_import_dynamic runtime._GetQueuedCompletionStatusEx GetQueuedCompletionStatusEx%6 "kernel32.dll"
//go:cgo_import_dynamic runtime._GetStdHandle GetStdHandle%1 "kernel32.dll"
//go:cgo_import_dynamic runtime._GetSystemDirectoryA GetSystemDirectoryA%2 "kernel32.dll"
//go:cgo_import_dynamic runtime._GetSystemInfo GetSystemInfo%1 "kernel32.dll"
//go:cgo_import_dynamic runtime._GetThreadContext GetThreadContext%2 "kernel32.dll"
//go:cgo_import_dynamic runtime._SetThreadContext SetThreadContext%2 "kernel32.dll"
//go:cgo_import_dynamic runtime._LoadLibraryExW LoadLibraryExW%3 "kernel32.dll"
//go:cgo_import_dynamic runtime._LoadLibraryW LoadLibraryW%1 "kernel32.dll"
//go:cgo_import_dynamic runtime._PostQueuedCompletionStatus PostQueuedCompletionStatus%4 "kernel32.dll"
//go:cgo_import_dynamic runtime._QueryPerformanceCounter QueryPerformanceCounter%1 "kernel32.dll"
//go:cgo_import_dynamic runtime._QueryPerformanceFrequency QueryPerformanceFrequency%1 "kernel32.dll"
//go:cgo_import_dynamic runtime._RaiseFailFastException RaiseFailFastException%3 "kernel32.dll"
//go:cgo_import_dynamic runtime._ResumeThread ResumeThread%1 "kernel32.dll"
//go:cgo_import_dynamic runtime._RtlLookupFunctionEntry RtlLookupFunctionEntry%3 "kernel32.dll"
//go:cgo_import_dynamic runtime._RtlVirtualUnwind  RtlVirtualUnwind%8 "kernel32.dll"
//go:cgo_import_dynamic runtime._SetConsoleCtrlHandler SetConsoleCtrlHandler%2 "kernel32.dll"
//go:cgo_import_dynamic runtime._SetErrorMode SetErrorMode%1 "kernel32.dll"
//go:cgo_import_dynamic runtime._SetEvent SetEvent%1 "kernel32.dll"
//go:cgo_import_dynamic runtime._SetProcessPriorityBoost SetProcessPriorityBoost%2 "kernel32.dll"
//go:cgo_import_dynamic runtime._SetThreadPriority SetThreadPriority%2 "kernel32.dll"
//go:cgo_import_dynamic runtime._SetUnhandledExceptionFilter SetUnhandledExceptionFilter%1 "kernel32.dll"
//go:cgo_import_dynamic runtime._SetWaitableTimer SetWaitableTimer%6 "kernel32.dll"
//go:cgo_import_dynamic runtime._SuspendThread SuspendThread%1 "kernel32.dll"
//go:cgo_import_dynamic runtime._SwitchToThread SwitchToThread%0 "kernel32.dll"
//go:cgo_import_dynamic runtime._TlsAlloc TlsAlloc%0 "kernel32.dll"
//go:cgo_import_dynamic runtime._VirtualAlloc VirtualAlloc%4 "kernel32.dll"
//go:cgo_import_dynamic runtime._VirtualFree VirtualFree%3 "kernel32.dll"
//go:cgo_import_dynamic runtime._VirtualQuery VirtualQuery%3 "kernel32.dll"
//go:cgo_import_dynamic runtime._WaitForSingleObject WaitForSingleObject%2 "kernel32.dll"
//go:cgo_import_dynamic runtime._WaitForMultipleObjects WaitForMultipleObjects%4 "kernel32.dll"
//go:cgo_import_dynamic runtime._WerGetFlags WerGetFlags%2 "kernel32.dll"
//go:cgo_import_dynamic runtime._WerSetFlags WerSetFlags%1 "kernel32.dll"
//go:cgo_import_dynamic runtime._WriteConsoleW WriteConsoleW%5 "kernel32.dll"
//go:cgo_import_dynamic runtime._WriteFile WriteFile%5 "kernel32.dll"

type stdFunction unsafe.Pointer

var (
	// Following syscalls are available on every Windows PC.
	// All these variables are set by the Windows executable
	// loader before the Go program starts.
	_AddVectoredContinueHandler,
	_AddVectoredExceptionHandler,
	_CloseHandle,
	_CreateEventA,
	_CreateIoCompletionPort,
	_CreateThread,
	_CreateWaitableTimerA,
	_CreateWaitableTimerExW,
	_DuplicateHandle,
	_ExitProcess,
	_FreeEnvironmentStringsW,
	_GetConsoleMode,
	_GetCurrentThreadId,
	_GetEnvironmentStringsW,
	_GetErrorMode,
	_GetProcAddress,
	_GetProcessAffinityMask,
	_GetQueuedCompletionStatusEx,
	_GetStdHandle,
	_GetSystemDirectoryA,
	_GetSystemInfo,
	_GetThreadContext,
	_SetThreadContext,
	_LoadLibraryExW,
	_LoadLibraryW,
	_PostQueuedCompletionStatus,
	_QueryPerformanceCounter,
	_QueryPerformanceFrequency,
	_RaiseFailFastException,
	_ResumeThread,
	_RtlLookupFunctionEntry,
	_RtlVirtualUnwind,
	_SetConsoleCtrlHandler,
	_SetErrorMode,
	_SetEvent,
	_SetProcessPriorityBoost,
	_SetThreadPriority,
	_SetUnhandledExceptionFilter,
	_SetWaitableTimer,
	_SuspendThread,
	_SwitchToThread,
	_TlsAlloc,
	_VirtualAlloc,
	_VirtualFree,
	_VirtualQuery,
	_WaitForSingleObject,
	_WaitForMultipleObjects,
	_WerGetFlags,
	_WerSetFlags,
	_WriteConsoleW,
	_WriteFile,
	_ stdFunction

	// Use ProcessPrng to generate cryptographically random data.
	_ProcessPrng stdFunction

	// Load ntdll.dll manually during startup, otherwise Mingw
	// links wrong printf function to cgo executable (see issue
	// 12030 for details).
	_NtCreateWaitCompletionPacket    stdFunction
	_NtAssociateWaitCompletionPacket stdFunction
	_NtCancelWaitCompletionPacket    stdFunction
	_RtlGetCurrentPeb                stdFunction
	_RtlGetVersion                   stdFunction

	// These are from non-kernel32.dll, so we prefer to LoadLibraryEx them.
	_timeBeginPeriod,
	_timeEndPeriod,
	_ stdFunction
)

var (
	bcryptprimitivesdll = [...]uint16{'b', 'c', 'r', 'y', 'p', 't', 'p', 'r', 'i', 'm', 'i', 't', 'i', 'v', 'e', 's', '.', 'd', 'l', 'l', 0}
	ntdlldll            = [...]uint16{'n', 't', 'd', 'l', 'l', '.', 'd', 'l', 'l', 0}
	powrprofdll         = [...]uint16{'p', 'o', 'w', 'r', 'p', 'r', 'o', 'f', '.', 'd', 'l', 'l', 0}
	winmmdll            = [...]uint16{'w', 'i', 'n', 'm', 'm', '.', 'd', 'l', 'l', 0}
)

// Function to be called by windows CreateThread
// to start new os thread.
func tstart_stdcall(newm *m)

// Init-time helper
func wintls()

type mOS struct {
	threadLock mutex   // protects "thread" and prevents closing
	thread     uintptr // thread handle

	waitsema   uintptr // semaphore for parking on locks
	resumesema uintptr // semaphore to indicate suspend/resume

	highResTimer   uintptr // high resolution timer handle used in usleep
	waitIocpTimer  uintptr // high resolution timer handle used in netpoll
	waitIocpHandle uintptr // wait completion handle used in netpoll

	// preemptExtLock synchronizes preemptM with entry/exit from
	// external C code.
	//
	// This protects against races between preemptM calling
	// SuspendThread and external code on this thread calling
	// ExitProcess. If these happen concurrently, it's possible to
	// exit the suspending thread and suspend the exiting thread,
	// leading to deadlock.
	//
	// 0 indicates this M is not being preempted or in external
	// code. Entering external code CASes this from 0 to 1. If
	// this fails, a preemption is in progress, so the thread must
	// wait for the preemption. preemptM also CASes this from 0 to
	// 1. If this fails, the preemption fails (as it would if the
	// PC weren't in Go code). The value is reset to 0 when
	// returning from external code or after a preemption is
	// complete.
	//
	// TODO(austin): We may not need this if preemption were more
	// tightly synchronized on the G/P status and preemption
	// blocked transition into _Gsyscall/_Psyscall.
	preemptExtLock uint32
}

// Stubs so tests can link correctly. These should never be called.
func open(name *byte, mode, perm int32) int32 {
	throw("unimplemented")
	return -1
}
func closefd(fd int32) int32 {
	throw("unimplemented")
	return -1
}
func read(fd int32, p unsafe.Pointer, n int32) int32 {
	throw("unimplemented")
	return -1
}

type sigset struct{}

// Call a Windows function with stdcall conventions,
// and switch to os stack during the call.
func asmstdcall(fn unsafe.Pointer)

var asmstdcallAddr unsafe.Pointer

type winlibcall libcall

func windowsFindfunc(lib uintptr, name []byte) stdFunction {
	if name[len(name)-1] != 0 {
		throw("usage")
	}
	f := stdcall2(_GetProcAddress, lib, uintptr(unsafe.Pointer(&name[0])))
	return stdFunction(unsafe.Pointer(f))
}

const _MAX_PATH = 260 // https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation
var sysDirectory [_MAX_PATH + 1]byte
var sysDirectoryLen uintptr

func initSysDirectory() {
	l := stdcall2(_GetSystemDirectoryA, uintptr(unsafe.Pointer(&sysDirectory[0])), uintptr(len(sysDirectory)-1))
	if l == 0 || l > uintptr(len(sysDirectory)-1) {
		throw("Unable to determine system directory")
	}
	sysDirectory[l] = '\\'
	sysDirectoryLen = l + 1
}

//go:linkname windows_GetSystemDirectory internal/syscall/windows.GetSystemDirectory
func windows_GetSystemDirectory() string {
	return unsafe.String(&sysDirectory[0], sysDirectoryLen)
}

func windowsLoadSystemLib(name []uint16) uintptr {
	return stdcall3(_LoadLibraryExW, uintptr(unsafe.Pointer(&name[0])), 0, _LOAD_LIBRARY_SEARCH_SYSTEM32)
}

//go:linkname windows_QueryPerformanceCounter internal/syscall/windows.QueryPerformanceCounter
func windows_QueryPerformanceCounter() int64 {
	var counter int64
	stdcall1(_QueryPerformanceCounter, uintptr(unsafe.Pointer(&counter)))
	return counter
}

//go:linkname windows_QueryPerformanceFrequency internal/syscall/windows.QueryPerformanceFrequency
func windows_QueryPerformanceFrequency() int64 {
	var frequency int64
	stdcall1(_QueryPerformanceFrequency, uintptr(unsafe.Pointer(&frequency)))
	return frequency
}

func loadOptionalSyscalls() {
	bcryptPrimitives := windowsLoadSystemLib(bcryptprimitivesdll[:])
	if bcryptPrimitives == 0 {
		throw("bcryptprimitives.dll not found")
	}
	_ProcessPrng = windowsFindfunc(bcryptPrimitives, []byte("ProcessPrng\000"))

	n32 := windowsLoadSystemLib(ntdlldll[:])
	if n32 == 0 {
		throw("ntdll.dll not found")
	}
	_NtCreateWaitCompletionPacket = windowsFindfunc(n32, []byte("NtCreateWaitCompletionPacket\000"))
	if _NtCreateWaitCompletionPacket != nil {
		// These functions should exists if NtCreateWaitCompletionPacket exists.
		_NtAssociateWaitCompletionPacket = windowsFindfunc(n32, []byte("NtAssociateWaitCompletionPacket\000"))
		if _NtAssociateWaitCompletionPacket == nil {
			throw("NtCreateWaitCompletionPacket exists but NtAssociateWaitCompletionPacket does not")
		}
		_NtCancelWaitCompletionPacket = windowsFindfunc(n32, []byte("NtCancelWaitCompletionPacket\000"))
		if _NtCancelWaitCompletionPacket == nil {
			throw("NtCreateWaitCompletionPacket exists but NtCancelWaitCompletionPacket does not")
		}
	}
	_RtlGetCurrentPeb = windowsFindfunc(n32, []byte("RtlGetCurrentPeb\000"))
	_RtlGetVersion = windowsFindfunc(n32, []byte("RtlGetVersion\000"))
}

func monitorSuspendResume() {
	const (
		_DEVICE_NOTIFY_CALLBACK = 2
	)
	type _DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS struct {
		callback uintptr
		context  uintptr
	}

	powrprof := windowsLoadSystemLib(powrprofdll[:])
	if powrprof == 0 {
		return // Running on Windows 7, where we don't need it anyway.
	}
	powerRegisterSuspendResumeNotification := windowsFindfunc(powrprof, []byte("PowerRegisterSuspendResumeNotification\000"))
	if powerRegisterSuspendResumeNotification == nil {
		return // Running on Windows 7, where we don't need it anyway.
	}
	var fn any = func(context uintptr, changeType uint32, setting uintptr) uintptr {
		for mp := (*m)(atomic.Loadp(unsafe.Pointer(&allm))); mp != nil; mp = mp.alllink {
			if mp.resumesema != 0 {
				stdcall1(_SetEvent, mp.resumesema)
			}
		}
		return 0
	}
	params := _DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS{
		callback: compileCallback(*efaceOf(&fn), true),
	}
	handle := uintptr(0)
	stdcall3(powerRegisterSuspendResumeNotification, _DEVICE_NOTIFY_CALLBACK,
		uintptr(unsafe.Pointer(&params)), uintptr(unsafe.Pointer(&handle)))
}

func getCPUCount() int32 {
	var mask, sysmask uintptr
	ret := stdcall3(_GetProcessAffinityMask, currentProcess, uintptr(unsafe.Pointer(&mask)), uintptr(unsafe.Pointer(&sysmask)))
	if ret != 0 {
		n := 0
		maskbits := int(unsafe.Sizeof(mask) * 8)
		for i := 0; i < maskbits; i++ {
			if mask&(1<<uint(i)) != 0 {
				n++
			}
		}
		if n != 0 {
			return int32(n)
		}
	}
	// use GetSystemInfo if GetProcessAffinityMask fails
	var info systeminfo
	stdcall1(_GetSystemInfo, uintptr(unsafe.Pointer(&info)))
	return int32(info.dwnumberofprocessors)
}

func getPageSize() uintptr {
	var info systeminfo
	stdcall1(_GetSystemInfo, uintptr(unsafe.Pointer(&info)))
	return uintptr(info.dwpagesize)
}

const (
	currentProcess = ^uintptr(0) // -1 = current process
	currentThread  = ^uintptr(1) // -2 = current thread
)

// in sys_windows_386.s and sys_windows_amd64.s:
func getlasterror() uint32

var timeBeginPeriodRetValue uint32

// osRelaxMinNS indicates that sysmon shouldn't osRelax if the next
// timer is less than 60 ms from now. Since osRelaxing may reduce
// timer resolution to 15.6 ms, this keeps timer error under roughly 1
// part in 4.
const osRelaxMinNS = 60 * 1e6

// osRelax is called by the scheduler when transitioning to and from
// all Ps being idle.
//
// Some versions of Windows have high resolution timer. For those
// versions osRelax is noop.
// For Windows versions without high resolution timer, osRelax
// adjusts the system-wide timer resolution. Go needs a
// high resolution timer while running and there's little extra cost
// if we're already using the CPU, but if all Ps are idle there's no
// need to consume extra power to drive the high-res timer.
func osRelax(relax bool) uint32 {
	if haveHighResTimer {
		// If the high resolution timer is available, the runtime uses the timer
		// to sleep for short durations. This means there's no need to adjust
		// the global clock frequency.
		return 0
	}

	if relax {
		return uint32(stdcall1(_timeEndPeriod, 1))
	} else {
		return uint32(stdcall1(_timeBeginPeriod, 1))
	}
}

// haveHighResTimer indicates that the CreateWaitableTimerEx
// CREATE_WAITABLE_TIMER_HIGH_RESOLUTION flag is available.
var haveHighResTimer = false

// haveHighResSleep indicates that NtCreateWaitCompletionPacket
// exists and haveHighResTimer is true.
// NtCreateWaitCompletionPacket has been available since Windows 10,
// but has just been publicly documented, so some platforms, like Wine,
// doesn't support it yet.
var haveHighResSleep = false

// createHighResTimer calls CreateWaitableTimerEx with
// CREATE_WAITABLE_TIMER_HIGH_RESOLUTION flag to create high
// resolution timer. createHighResTimer returns new timer
// handle or 0, if CreateWaitableTimerEx failed.
func createHighResTimer() uintptr {
	const (
		// As per @jstarks, see
		// https://github.com/golang/go/issues/8687#issuecomment-656259353
		_CREATE_WAITABLE_TIMER_HIGH_RESOLUTION = 0x00000002

		_SYNCHRONIZE        = 0x00100000
		_TIMER_QUERY_STATE  = 0x0001
		_TIMER_MODIFY_STATE = 0x0002
	)
	return stdcall4(_CreateWaitableTimerExW, 0, 0,
		_CREATE_WAITABLE_TIMER_HIGH_RESOLUTION,
		_SYNCHRONIZE|_TIMER_QUERY_STATE|_TIMER_MODIFY_STATE)
}

func initHighResTimer() {
	h := createHighResTimer()
	if h != 0 {
		haveHighResTimer = true
		haveHighResSleep = _NtCreateWaitCompletionPacket != nil
		stdcall1(_CloseHandle, h)
	} else {
		// Only load winmm.dll if we need it.
		// This avoids a dependency on winmm.dll for Go programs
		// that run on new Windows versions.
		m32 := windowsLoadSystemLib(winmmdll[:])
		if m32 == 0 {
			print("runtime: LoadLibraryExW failed; errno=", getlasterror(), "\n")
			throw("winmm.dll not found")
		}
		_timeBeginPeriod = windowsFindfunc(m32, []byte("timeBeginPeriod\000"))
		_timeEndPeriod = windowsFindfunc(m32, []byte("timeEndPeriod\000"))
		if _timeBeginPeriod == nil || _timeEndPeriod == nil {
			print("runtime: GetProcAddress failed; errno=", getlasterror(), "\n")
			throw("timeBegin/EndPeriod not found")
		}
	}
}

//go:linkname canUseLongPaths internal/syscall/windows.CanUseLongPaths
var canUseLongPaths bool

// initLongPathSupport enables long path support.
func initLongPathSupport() {
	const (
		IsLongPathAwareProcess = 0x80
		PebBitFieldOffset      = 3
	)

	// Check that we're ≥ 10.0.15063.
	info := _OSVERSIONINFOW{}
	info.osVersionInfoSize = uint32(unsafe.Sizeof(info))
	stdcall1(_RtlGetVersion, uintptr(unsafe.Pointer(&info)))
	if info.majorVersion < 10 || (info.majorVersion == 10 && info.minorVersion == 0 && info.buildNumber < 15063) {
		return
	}

	// Set the IsLongPathAwareProcess flag of the PEB's bit field.
	// This flag is not documented, but it's known to be used
	// by Windows to enable long path support.
	bitField := (*byte)(unsafe.Pointer(stdcall0(_RtlGetCurrentPeb) + PebBitFieldOffset))
	*bitField |= IsLongPathAwareProcess

	canUseLongPaths = true
}

func osinit() {
	asmstdcallAddr = unsafe.Pointer(abi.FuncPCABI0(asmstdcall))

	loadOptionalSyscalls()

	preventErrorDialogs()

	initExceptionHandler()

	initHighResTimer()
	timeBeginPeriodRetValue = osRelax(false)

	initSysDirectory()
	initLongPathSupport()

	numCPUStartup = getCPUCount()

	physPageSize = getPageSize()

	// Windows dynamic priority boosting assumes that a process has different types
	// of dedicated threads -- GUI, IO, computational, etc. Go processes use
	// equivalent threads that all do a mix of GUI, IO, computations, etc.
	// In such context dynamic priority boosting does nothing but harm, so we turn it off.
	stdcall2(_SetProcessPriorityBoost, currentProcess, 1)
}

//go:nosplit
func readRandom(r []byte) int {
	n := 0
	if stdcall2(_ProcessPrng, uintptr(unsafe.Pointer(&r[0])), uintptr(len(r)))&0xff != 0 {
		n = len(r)
	}
	return n
}

func goenvs() {
	// strings is a pointer to environment variable pairs in the form:
	//     "envA=valA\x00envB=valB\x00\x00" (in UTF-16)
	// Two consecutive zero bytes end the list.
	strings := unsafe.Pointer(stdcall0(_GetEnvironmentStringsW))
	p := (*[1 << 24]uint16)(strings)[:]

	n := 0
	for from, i := 0, 0; true; i++ {
		if p[i] == 0 {
			// empty string marks the end
			if i == from {
				break
			}
			from = i + 1
			n++
		}
	}
	envs = make([]string, n)

	for i := range envs {
		envs[i] = gostringw(&p[0])
		for p[0] != 0 {
			p = p[1:]
		}
		p = p[1:] // skip nil byte
	}

	stdcall1(_FreeEnvironmentStringsW, uintptr(strings))

	// We call these all the way here, late in init, so that malloc works
	// for the callback functions these generate.
	var fn any = ctrlHandler
	ctrlHandlerPC := compileCallback(*efaceOf(&fn), true)
	stdcall2(_SetConsoleCtrlHandler, ctrlHandlerPC, 1)

	monitorSuspendResume()
}

// exiting is set to non-zero when the process is exiting.
var exiting uint32

//go:nosplit
func exit(code int32) {
	// Disallow thread suspension for preemption. Otherwise,
	// ExitProcess and SuspendThread can race: SuspendThread
	// queues a suspension request for this thread, ExitProcess
	// kills the suspending thread, and then this thread suspends.
	lock(&suspendLock)
	atomic.Store(&exiting, 1)
	stdcall1(_ExitProcess, uintptr(code))
}

// write1 must be nosplit because it's used as a last resort in
// functions like badmorestackg0. In such cases, we'll always take the
// ASCII path.
//
//go:nosplit
func write1(fd uintptr, buf unsafe.Pointer, n int32) int32 {
	const (
		_STD_OUTPUT_HANDLE = ^uintptr(10) // -11
		_STD_ERROR_HANDLE  = ^uintptr(11) // -12
	)
	var handle uintptr
	switch fd {
	case 1:
		handle = stdcall1(_GetStdHandle, _STD_OUTPUT_HANDLE)
	case 2:
		handle = stdcall1(_GetStdHandle, _STD_ERROR_HANDLE)
	default:
		// assume fd is real windows handle.
		handle = fd
	}
	isASCII := true
	b := (*[1 << 30]byte)(buf)[:n]
	for _, x := range b {
		if x >= 0x80 {
			isASCII = false
			break
		}
	}

	if !isASCII {
		var m uint32
		isConsole := stdcall2(_GetConsoleMode, handle, uintptr(unsafe.Pointer(&m))) != 0
		// If this is a console output, various non-unicode code pages can be in use.
		// Use the dedicated WriteConsole call to ensure unicode is printed correctly.
		if isConsole {
			return int32(writeConsole(handle, buf, n))
		}
	}
	var written uint32
	stdcall5(_WriteFile, handle, uintptr(buf), uintptr(n), uintptr(unsafe.Pointer(&written)), 0)
	return int32(written)
}

var (
	utf16ConsoleBack     [1000]uint16
	utf16ConsoleBackLock mutex
)

// writeConsole writes bufLen bytes from buf to the console File.
// It returns the number of bytes written.
func writeConsole(handle uintptr, buf unsafe.Pointer, bufLen int32) int {
	const surr2 = (surrogateMin + surrogateMax + 1) / 2

	// Do not use defer for unlock. May cause issues when printing a panic.
	lock(&utf16ConsoleBackLock)

	b := (*[1 << 30]byte)(buf)[:bufLen]
	s := *(*string)(unsafe.Pointer(&b))

	utf16tmp := utf16ConsoleBack[:]

	total := len(s)
	w := 0
	for _, r := range s {
		if w >= len(utf16tmp)-2 {
			writeConsoleUTF16(handle, utf16tmp[:w])
			w = 0
		}
		if r < 0x10000 {
			utf16tmp[w] = uint16(r)
			w++
		} else {
			r -= 0x10000
			utf16tmp[w] = surrogateMin + uint16(r>>10)&0x3ff
			utf16tmp[w+1] = surr2 + uint16(r)&0x3ff
			w += 2
		}
	}
	writeConsoleUTF16(handle, utf16tmp[:w])
	unlock(&utf16ConsoleBackLock)
	return total
}

// writeConsoleUTF16 is the dedicated windows calls that correctly prints
// to the console regardless of the current code page. Input is utf-16 code points.
// The handle must be a console handle.
func writeConsoleUTF16(handle uintptr, b []uint16) {
	l := uint32(len(b))
	if l == 0 {
		return
	}
	var written uint32
	stdcall5(_WriteConsoleW,
		handle,
		uintptr(unsafe.Pointer(&b[0])),
		uintptr(l),
		uintptr(unsafe.Pointer(&written)),
		0,
	)
	return
}

//go:nosplit
func semasleep(ns int64) int32 {
	const (
		_WAIT_ABANDONED = 0x00000080
		_WAIT_OBJECT_0  = 0x00000000
		_WAIT_TIMEOUT   = 0x00000102
		_WAIT_FAILED    = 0xFFFFFFFF
	)

	var result uintptr
	if ns < 0 {
		result = stdcall2(_WaitForSingleObject, getg().m.waitsema, uintptr(_INFINITE))
	} else {
		start := nanotime()
		elapsed := int64(0)
		for {
			ms := int64(timediv(ns-elapsed, 1000000, nil))
			if ms == 0 {
				ms = 1
			}
			result = stdcall4(_WaitForMultipleObjects, 2,
				uintptr(unsafe.Pointer(&[2]uintptr{getg().m.waitsema, getg().m.resumesema})),
				0, uintptr(ms))
			if result != _WAIT_OBJECT_0+1 {
				// Not a suspend/resume event
				break
			}
			elapsed = nanotime() - start
			if elapsed >= ns {
				return -1
			}
		}
	}
	switch result {
	case _WAIT_OBJECT_0: // Signaled
		return 0

	case _WAIT_TIMEOUT:
		return -1

	case _WAIT_ABANDONED:
		systemstack(func() {
			throw("runtime.semasleep wait_abandoned")
		})

	case _WAIT_FAILED:
		systemstack(func() {
			print("runtime: waitforsingleobject wait_failed; errno=", getlasterror(), "\n")
			throw("runtime.semasleep wait_failed")
		})

	default:
		systemstack(func() {
			print("runtime: waitforsingleobject unexpected; result=", result, "\n")
			throw("runtime.semasleep unexpected")
		})
	}

	return -1 // unreachable
}

//go:nosplit
func semawakeup(mp *m) {
	if stdcall1(_SetEvent, mp.waitsema) == 0 {
		systemstack(func() {
			print("runtime: setevent failed; errno=", getlasterror(), "\n")
			throw("runtime.semawakeup")
		})
	}
}

//go:nosplit
func semacreate(mp *m) {
	if mp.waitsema != 0 {
		return
	}
	mp.waitsema = stdcall4(_CreateEventA, 0, 0, 0, 0)
	if mp.waitsema == 0 {
		systemstack(func() {
			print("runtime: createevent failed; errno=", getlasterror(), "\n")
			throw("runtime.semacreate")
		})
	}
	mp.resumesema = stdcall4(_CreateEventA, 0, 0, 0, 0)
	if mp.resumesema == 0 {
		systemstack(func() {
			print("runtime: createevent failed; errno=", getlasterror(), "\n")
			throw("runtime.semacreate")
		})
		stdcall1(_CloseHandle, mp.waitsema)
		mp.waitsema = 0
	}
}

// May run with m.p==nil, so write barriers are not allowed. This
// function is called by newosproc0, so it is also required to
// operate without stack guards.
//
//go:nowritebarrierrec
//go:nosplit
func newosproc(mp *m) {
	// We pass 0 for the stack size to use the default for this binary.
	thandle := stdcall6(_CreateThread, 0, 0,
		abi.FuncPCABI0(tstart_stdcall), uintptr(unsafe.Pointer(mp)),
		0, 0)

	if thandle == 0 {
		if atomic.Load(&exiting) != 0 {
			// CreateThread may fail if called
			// concurrently with ExitProcess. If this
			// happens, just freeze this thread and let
			// the process exit. See issue #18253.
			lock(&deadlock)
			lock(&deadlock)
		}
		print("runtime: failed to create new OS thread (have ", mcount(), " already; errno=", getlasterror(), ")\n")
		throw("runtime.newosproc")
	}

	// Close thandle to avoid leaking the thread object if it exits.
	stdcall1(_CloseHandle, thandle)
}

// Used by the C library build mode. On Linux this function would allocate a
// stack, but that's not necessary for Windows. No stack guards are present
// and the GC has not been initialized, so write barriers will fail.
//
//go:nowritebarrierrec
//go:nosplit
func newosproc0(mp *m, stk unsafe.Pointer) {
	// TODO: this is completely broken. The args passed to newosproc0 (in asm_amd64.s)
	// are stacksize and function, not *m and stack.
	// Check os_linux.go for an implementation that might actually work.
	throw("bad newosproc0")
}

func exitThread(wait *atomic.Uint32) {
	// We should never reach exitThread on Windows because we let
	// the OS clean up threads.
	throw("exitThread")
}

// Called to initialize a new m (including the bootstrap m).
// Called on the parent thread (main thread in case of bootstrap), can allocate memory.
func mpreinit(mp *m) {
}

//go:nosplit
func sigsave(p *sigset) {
}

//go:nosplit
func msigrestore(sigmask sigset) {
}

//go:nosplit
//go:nowritebarrierrec
func clearSignalHandlers() {
}

//go:nosplit
func sigblock(exiting bool) {
}

// Called to initialize a new m (including the bootstrap m).
// Called on the new thread, cannot allocate Go memory.
func minit() {
	var thandle uintptr
	if stdcall7(_DuplicateHandle, currentProcess, currentThread, currentProcess, uintptr(unsafe.Pointer(&thandle)), 0, 0, _DUPLICATE_SAME_ACCESS) == 0 {
		print("runtime.minit: duplicatehandle failed; errno=", getlasterror(), "\n")
		throw("runtime.minit: duplicatehandle failed")
	}

	mp := getg().m
	lock(&mp.threadLock)
	mp.thread = thandle
	mp.procid = uint64(stdcall0(_GetCurrentThreadId))

	// Configure usleep timer, if possible.
	if mp.highResTimer == 0 && haveHighResTimer {
		mp.highResTimer = createHighResTimer()
		if mp.highResTimer == 0 {
			print("runtime: CreateWaitableTimerEx failed; errno=", getlasterror(), "\n")
			throw("CreateWaitableTimerEx when creating timer failed")
		}
	}
	if mp.waitIocpHandle == 0 && haveHighResSleep {
		mp.waitIocpTimer = createHighResTimer()
		if mp.waitIocpTimer == 0 {
			print("runtime: CreateWaitableTimerEx failed; errno=", getlasterror(), "\n")
			throw("CreateWaitableTimerEx when creating timer failed")
		}
		const GENERIC_ALL = 0x10000000
		errno := stdcall3(_NtCreateWaitCompletionPacket, uintptr(unsafe.Pointer(&mp.waitIocpHandle)), GENERIC_ALL, 0)
		if mp.waitIocpHandle == 0 {
			print("runtime: NtCreateWaitCompletionPacket failed; errno=", errno, "\n")
			throw("NtCreateWaitCompletionPacket failed")
		}
	}
	unlock(&mp.threadLock)

	// Query the true stack base from the OS. Currently we're
	// running on a small assumed stack.
	var mbi memoryBasicInformation
	res := stdcall3(_VirtualQuery, uintptr(unsafe.Pointer(&mbi)), uintptr(unsafe.Pointer(&mbi)), unsafe.Sizeof(mbi))
	if res == 0 {
		print("runtime: VirtualQuery failed; errno=", getlasterror(), "\n")
		throw("VirtualQuery for stack base failed")
	}
	// The system leaves an 8K PAGE_GUARD region at the bottom of
	// the stack (in theory VirtualQuery isn't supposed to include
	// that, but it does). Add an additional 8K of slop for
	// calling C functions that don't have stack checks and for
	// lastcontinuehandler. We shouldn't be anywhere near this
	// bound anyway.
	base := mbi.allocationBase + 16<<10
	// Sanity check the stack bounds.
	g0 := getg()
	if base > g0.stack.hi || g0.stack.hi-base > 64<<20 {
		print("runtime: g0 stack [", hex(base), ",", hex(g0.stack.hi), ")\n")
		throw("bad g0 stack")
	}
	g0.stack.lo = base
	g0.stackguard0 = g0.stack.lo + stackGuard
	g0.stackguard1 = g0.stackguard0
	// Sanity check the SP.
	stackcheck()
}

// Called from dropm to undo the effect of an minit.
//
//go:nosplit
func unminit() {
	mp := getg().m
	lock(&mp.threadLock)
	if mp.thread != 0 {
		stdcall1(_CloseHandle, mp.thread)
		mp.thread = 0
	}
	unlock(&mp.threadLock)

	mp.procid = 0
}

// Called from mexit, but not from dropm, to undo the effect of thread-owned
// resources in minit, semacreate, or elsewhere. Do not take locks after calling this.
//
// This always runs without a P, so //go:nowritebarrierrec is required.
//
//go:nowritebarrierrec
//go:nosplit
func mdestroy(mp *m) {
	if mp.highResTimer != 0 {
		stdcall1(_CloseHandle, mp.highResTimer)
		mp.highResTimer = 0
	}
	if mp.waitIocpTimer != 0 {
		stdcall1(_CloseHandle, mp.waitIocpTimer)
		mp.waitIocpTimer = 0
	}
	if mp.waitIocpHandle != 0 {
		stdcall1(_CloseHandle, mp.waitIocpHandle)
		mp.waitIocpHandle = 0
	}
	if mp.waitsema != 0 {
		stdcall1(_CloseHandle, mp.waitsema)
		mp.waitsema = 0
	}
	if mp.resumesema != 0 {
		stdcall1(_CloseHandle, mp.resumesema)
		mp.resumesema = 0
	}
}

// asmstdcall_trampoline calls asmstdcall converting from Go to C calling convention.
func asmstdcall_trampoline(args unsafe.Pointer)

// stdcall_no_g calls asmstdcall on os stack without using g.
//
//go:nosplit
func stdcall_no_g(fn stdFunction, n int, args uintptr) uintptr {
	libcall := libcall{
		fn:   uintptr(unsafe.Pointer(fn)),
		n:    uintptr(n),
		args: args,
	}
	asmstdcall_trampoline(noescape(unsafe.Pointer(&libcall)))
	return libcall.r1
}

// Calling stdcall on os stack.
// May run during STW, so write barriers are not allowed.
//
//go:nowritebarrier
//go:nosplit
func stdcall(fn stdFunction) uintptr {
	gp := getg()
	mp := gp.m
	mp.libcall.fn = uintptr(unsafe.Pointer(fn))
	resetLibcall := false
	if mp.profilehz != 0 && mp.libcallsp == 0 {
		// leave pc/sp for cpu profiler
		mp.libcallg.set(gp)
		mp.libcallpc = sys.GetCallerPC()
		// sp must be the last, because once async cpu profiler finds
		// all three values to be non-zero, it will use them
		mp.libcallsp = sys.GetCallerSP()
		resetLibcall = true // See comment in sys_darwin.go:libcCall
	}
	asmcgocall(asmstdcallAddr, unsafe.Pointer(&mp.libcall))
	if resetLibcall {
		mp.libcallsp = 0
	}
	return mp.libcall.r1
}

//go:nosplit
func stdcall0(fn stdFunction) uintptr {
	mp := getg().m
	mp.libcall.n = 0
	mp.libcall.args = 0
	return stdcall(fn)
}

//go:nosplit
//go:cgo_unsafe_args
func stdcall1(fn stdFunction, a0 uintptr) uintptr {
	mp := getg().m
	mp.libcall.n = 1
	mp.libcall.args = uintptr(noescape(unsafe.Pointer(&a0)))
	return stdcall(fn)
}

//go:nosplit
//go:cgo_unsafe_args
func stdcall2(fn stdFunction, a0, a1 uintptr) uintptr {
	mp := getg().m
	mp.libcall.n = 2
	mp.libcall.args = uintptr(noescape(unsafe.Pointer(&a0)))
	return stdcall(fn)
}

//go:nosplit
//go:cgo_unsafe_args
func stdcall3(fn stdFunction, a0, a1, a2 uintptr) uintptr {
	mp := getg().m
	mp.libcall.n = 3
	mp.libcall.args = uintptr(noescape(unsafe.Pointer(&a0)))
	return stdcall(fn)
}

//go:nosplit
//go:cgo_unsafe_args
func stdcall4(fn stdFunction, a0, a1, a2, a3 uintptr) uintptr {
	mp := getg().m
	mp.libcall.n = 4
	mp.libcall.args = uintptr(noescape(unsafe.Pointer(&a0)))
	return stdcall(fn)
}

//go:nosplit
//go:cgo_unsafe_args
func stdcall5(fn stdFunction, a0, a1, a2, a3, a4 uintptr) uintptr {
	mp := getg().m
	mp.libcall.n = 5
	mp.libcall.args = uintptr(noescape(unsafe.Pointer(&a0)))
	return stdcall(fn)
}

//go:nosplit
//go:cgo_unsafe_args
func stdcall6(fn stdFunction, a0, a1, a2, a3, a4, a5 uintptr) uintptr {
	mp := getg().m
	mp.libcall.n = 6
	mp.libcall.args = uintptr(noescape(unsafe.Pointer(&a0)))
	return stdcall(fn)
}

//go:nosplit
//go:cgo_unsafe_args
func stdcall7(fn stdFunction, a0, a1, a2, a3, a4, a5, a6 uintptr) uintptr {
	mp := getg().m
	mp.libcall.n = 7
	mp.libcall.args = uintptr(noescape(unsafe.Pointer(&a0)))
	return stdcall(fn)
}

//go:nosplit
//go:cgo_unsafe_args
func stdcall8(fn stdFunction, a0, a1, a2, a3, a4, a5, a6, a7 uintptr) uintptr {
	mp := getg().m
	mp.libcall.n = 8
	mp.libcall.args = uintptr(noescape(unsafe.Pointer(&a0)))
	return stdcall(fn)
}

// These must run on the system stack only.

//go:nosplit
func osyield_no_g() {
	stdcall_no_g(_SwitchToThread, 0, 0)
}

//go:nosplit
func osyield() {
	systemstack(func() {
		stdcall0(_SwitchToThread)
	})
}

//go:nosplit
func usleep_no_g(us uint32) {
	timeout := uintptr(us) / 1000 // ms units
	args := [...]uintptr{_INVALID_HANDLE_VALUE, timeout}
	stdcall_no_g(_WaitForSingleObject, len(args), uintptr(noescape(unsafe.Pointer(&args[0]))))
}

//go:nosplit
func usleep(us uint32) {
	systemstack(func() {
		var h, timeout uintptr
		// If the high-res timer is available and its handle has been allocated for this m, use it.
		// Otherwise fall back to the low-res one, which doesn't need a handle.
		if haveHighResTimer && getg().m.highResTimer != 0 {
			h = getg().m.highResTimer
			dt := -10 * int64(us) // relative sleep (negative), 100ns units
			stdcall6(_SetWaitableTimer, h, uintptr(unsafe.Pointer(&dt)), 0, 0, 0, 0)
			timeout = _INFINITE
		} else {
			h = _INVALID_HANDLE_VALUE
			timeout = uintptr(us) / 1000 // ms units
		}
		stdcall2(_WaitForSingleObject, h, timeout)
	})
}

func ctrlHandler(_type uint32) uintptr {
	var s uint32

	switch _type {
	case _CTRL_C_EVENT, _CTRL_BREAK_EVENT:
		s = _SIGINT
	case _CTRL_CLOSE_EVENT, _CTRL_LOGOFF_EVENT, _CTRL_SHUTDOWN_EVENT:
		s = _SIGTERM
	default:
		return 0
	}

	if sigsend(s) {
		if s == _SIGTERM {
			// Windows terminates the process after this handler returns.
			// Block indefinitely to give signal handlers a chance to clean up,
			// but make sure to be properly parked first, so the rest of the
			// program can continue executing.
			block()
		}
		return 1
	}
	return 0
}

// called from zcallback_windows_*.s to sys_windows_*.s
func callbackasm1()

var profiletimer uintptr

func profilem(mp *m, thread uintptr) {
	// Align Context to 16 bytes.
	var c *context
	var cbuf [unsafe.Sizeof(*c) + 15]byte
	c = (*context)(unsafe.Pointer((uintptr(unsafe.Pointer(&cbuf[15]))) &^ 15))

	c.contextflags = _CONTEXT_CONTROL
	stdcall2(_GetThreadContext, thread, uintptr(unsafe.Pointer(c)))

	gp := gFromSP(mp, c.sp())

	sigprof(c.ip(), c.sp(), c.lr(), gp, mp)
}

func gFromSP(mp *m, sp uintptr) *g {
	if gp := mp.g0; gp != nil && gp.stack.lo < sp && sp < gp.stack.hi {
		return gp
	}
	if gp := mp.gsignal; gp != nil && gp.stack.lo < sp && sp < gp.stack.hi {
		return gp
	}
	if gp := mp.curg; gp != nil && gp.stack.lo < sp && sp < gp.stack.hi {
		return gp
	}
	return nil
}

func profileLoop() {
	stdcall2(_SetThreadPriority, currentThread, _THREAD_PRIORITY_HIGHEST)

	for {
		stdcall2(_WaitForSingleObject, profiletimer, _INFINITE)
		first := (*m)(atomic.Loadp(unsafe.Pointer(&allm)))
		for mp := first; mp != nil; mp = mp.alllink {
			if mp == getg().m {
				// Don't profile ourselves.
				continue
			}

			lock(&mp.threadLock)
			// Do not profile threads blocked on Notes,
			// this includes idle worker threads,
			// idle timer thread, idle heap scavenger, etc.
			if mp.thread == 0 || mp.profilehz == 0 || mp.blocked {
				unlock(&mp.threadLock)
				continue
			}
			// Acquire our own handle to the thread.
			var thread uintptr
			if stdcall7(_DuplicateHandle, currentProcess, mp.thread, currentProcess, uintptr(unsafe.Pointer(&thread)), 0, 0, _DUPLICATE_SAME_ACCESS) == 0 {
				print("runtime: duplicatehandle failed; errno=", getlasterror(), "\n")
				throw("duplicatehandle failed")
			}
			unlock(&mp.threadLock)

			// mp may exit between the DuplicateHandle
			// above and the SuspendThread. The handle
			// will remain valid, but SuspendThread may
			// fail.
			if int32(stdcall1(_SuspendThread, thread)) == -1 {
				// The thread no longer exists.
				stdcall1(_CloseHandle, thread)
				continue
			}
			if mp.profilehz != 0 && !mp.blocked {
				// Pass the thread handle in case mp
				// was in the process of shutting down.
				profilem(mp, thread)
			}
			stdcall1(_ResumeThread, thread)
			stdcall1(_CloseHandle, thread)
		}
	}
}

func setProcessCPUProfiler(hz int32) {
	if profiletimer == 0 {
		var timer uintptr
		if haveHighResTimer {
			timer = createHighResTimer()
		} else {
			timer = stdcall3(_CreateWaitableTimerA, 0, 0, 0)
		}
		atomic.Storeuintptr(&profiletimer, timer)
		newm(profileLoop, nil, -1)
	}
}

func setThreadCPUProfiler(hz int32) {
	ms := int32(0)
	due := ^int64(^uint64(1 << 63))
	if hz > 0 {
		ms = 1000 / hz
		if ms == 0 {
			ms = 1
		}
		due = int64(ms) * -10000
	}
	stdcall6(_SetWaitableTimer, profiletimer, uintptr(unsafe.Pointer(&due)), uintptr(ms), 0, 0, 0)
	atomic.Store((*uint32)(unsafe.Pointer(&getg().m.profilehz)), uint32(hz))
}

const preemptMSupported = true

// suspendLock protects simultaneous SuspendThread operations from
// suspending each other.
var suspendLock mutex

func preemptM(mp *m) {
	if mp == getg().m {
		throw("self-preempt")
	}

	// Synchronize with external code that may try to ExitProcess.
	if !atomic.Cas(&mp.preemptExtLock, 0, 1) {
		// External code is running. Fail the preemption
		// attempt.
		mp.preemptGen.Add(1)
		return
	}

	// Acquire our own handle to mp's thread.
	lock(&mp.threadLock)
	if mp.thread == 0 {
		// The M hasn't been minit'd yet (or was just unminit'd).
		unlock(&mp.threadLock)
		atomic.Store(&mp.preemptExtLock, 0)
		mp.preemptGen.Add(1)
		return
	}
	var thread uintptr
	if stdcall7(_DuplicateHandle, currentProcess, mp.thread, currentProcess, uintptr(unsafe.Pointer(&thread)), 0, 0, _DUPLICATE_SAME_ACCESS) == 0 {
		print("runtime.preemptM: duplicatehandle failed; errno=", getlasterror(), "\n")
		throw("runtime.preemptM: duplicatehandle failed")
	}
	unlock(&mp.threadLock)

	// Prepare thread context buffer. This must be aligned to 16 bytes.
	var c *context
	var cbuf [unsafe.Sizeof(*c) + 15]byte
	c = (*context)(unsafe.Pointer((uintptr(unsafe.Pointer(&cbuf[15]))) &^ 15))
	c.contextflags = _CONTEXT_CONTROL

	// Serialize thread suspension. SuspendThread is asynchronous,
	// so it's otherwise possible for two threads to suspend each
	// other and deadlock. We must hold this lock until after
	// GetThreadContext, since that blocks until the thread is
	// actually suspended.
	lock(&suspendLock)

	// Suspend the thread.
	if int32(stdcall1(_SuspendThread, thread)) == -1 {
		unlock(&suspendLock)
		stdcall1(_CloseHandle, thread)
		atomic.Store(&mp.preemptExtLock, 0)
		// The thread no longer exists. This shouldn't be
		// possible, but just acknowledge the request.
		mp.preemptGen.Add(1)
		return
	}

	// We have to be very careful between this point and once
	// we've shown mp is at an async safe-point. This is like a
	// signal handler in the sense that mp could have been doing
	// anything when we stopped it, including holding arbitrary
	// locks.

	// We have to get the thread context before inspecting the M
	// because SuspendThread only requests a suspend.
	// GetThreadContext actually blocks until it's suspended.
	stdcall2(_GetThreadContext, thread, uintptr(unsafe.Pointer(c)))

	unlock(&suspendLock)

	// Does it want a preemption and is it safe to preempt?
	gp := gFromSP(mp, c.sp())
	if gp != nil && wantAsyncPreempt(gp) {
		if ok, resumePC := isAsyncSafePoint(gp, c.ip(), c.sp(), c.lr()); ok {
			// Inject call to asyncPreempt
			targetPC := abi.FuncPCABI0(asyncPreempt)
			c.pushCall(targetPC, resumePC)
			stdcall2(_SetThreadContext, thread, uintptr(unsafe.Pointer(c)))
		}
	}

	atomic.Store(&mp.preemptExtLock, 0)

	// Acknowledge the preemption.
	mp.preemptGen.Add(1)

	stdcall1(_ResumeThread, thread)
	stdcall1(_CloseHandle, thread)
}

// osPreemptExtEnter is called before entering external code that may
// call ExitProcess.
//
// This must be nosplit because it may be called from a syscall with
// untyped stack slots, so the stack must not be grown or scanned.
//
//go:nosplit
func osPreemptExtEnter(mp *m) {
	for !atomic.Cas(&mp.preemptExtLock, 0, 1) {
		// An asynchronous preemption is in progress. It's not
		// safe to enter external code because it may call
		// ExitProcess and deadlock with SuspendThread.
		// Ideally we would do the preemption ourselves, but
		// can't since there may be untyped syscall arguments
		// on the stack. Instead, just wait and encourage the
		// SuspendThread APC to run. The preemption should be
		// done shortly.
		osyield()
	}
	// Asynchronous preemption is now blocked.
}

// osPreemptExtExit is called after returning from external code that
// may call ExitProcess.
//
// See osPreemptExtEnter for why this is nosplit.
//
//go:nosplit
func osPreemptExtExit(mp *m) {
	atomic.Store(&mp.preemptExtLock, 0)
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
16 Dec 2025 9.30 PM
root / root
0755
asan
--
16 Dec 2025 9.30 PM
root / root
0755
cgo
--
16 Dec 2025 9.30 PM
root / root
0755
coverage
--
16 Dec 2025 9.30 PM
root / root
0755
debug
--
16 Dec 2025 9.30 PM
root / root
0755
metrics
--
16 Dec 2025 9.30 PM
root / root
0755
msan
--
16 Dec 2025 9.30 PM
root / root
0755
pprof
--
16 Dec 2025 9.30 PM
root / root
0755
race
--
16 Dec 2025 9.34 PM
root / root
0755
trace
--
16 Dec 2025 9.30 PM
root / root
0755
HACKING.md
16.996 KB
4 Dec 2025 6.06 PM
root / root
0644
Makefile
0.174 KB
4 Dec 2025 6.06 PM
root / root
0644
alg.go
11.129 KB
4 Dec 2025 6.06 PM
root / root
0644
arena.go
38.046 KB
4 Dec 2025 6.06 PM
root / root
0644
asan.go
1.998 KB
4 Dec 2025 6.06 PM
root / root
0644
asan0.go
0.989 KB
4 Dec 2025 6.06 PM
root / root
0644
asan_amd64.s
3.342 KB
4 Dec 2025 6.06 PM
root / root
0644
asan_arm64.s
3.04 KB
4 Dec 2025 6.06 PM
root / root
0644
asan_loong64.s
3.013 KB
4 Dec 2025 6.06 PM
root / root
0644
asan_ppc64le.s
3.625 KB
4 Dec 2025 6.06 PM
root / root
0644
asan_riscv64.s
2.789 KB
4 Dec 2025 6.06 PM
root / root
0644
asm.s
0.377 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_386.s
42.975 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_amd64.h
0.616 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_amd64.s
60.331 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_arm.s
31.931 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_arm64.s
44.624 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_loong64.s
34.597 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_mips64x.s
24.202 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_mipsx.s
26.186 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_ppc64x.h
1.933 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_ppc64x.s
45.254 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_riscv64.h
0.522 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_riscv64.s
27.11 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_s390x.s
27.919 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_wasm.s
13.101 KB
4 Dec 2025 6.06 PM
root / root
0644
atomic_arm64.s
0.253 KB
4 Dec 2025 6.06 PM
root / root
0644
atomic_loong64.s
0.267 KB
4 Dec 2025 6.06 PM
root / root
0644
atomic_mips64x.s
0.293 KB
4 Dec 2025 6.06 PM
root / root
0644
atomic_mipsx.s
0.256 KB
4 Dec 2025 6.06 PM
root / root
0644
atomic_pointer.go
3.979 KB
4 Dec 2025 6.06 PM
root / root
0644
atomic_ppc64x.s
0.427 KB
4 Dec 2025 6.06 PM
root / root
0644
atomic_riscv64.s
0.269 KB
4 Dec 2025 6.06 PM
root / root
0644
auxv_none.go
0.291 KB
4 Dec 2025 6.06 PM
root / root
0644
badlinkname.go
0.646 KB
4 Dec 2025 6.06 PM
root / root
0644
badlinkname_linux.go
0.494 KB
4 Dec 2025 6.06 PM
root / root
0644
cgo.go
3.613 KB
4 Dec 2025 6.06 PM
root / root
0644
cgo_mmap.go
2.423 KB
4 Dec 2025 6.06 PM
root / root
0644
cgo_ppc64x.go
0.408 KB
4 Dec 2025 6.06 PM
root / root
0644
cgo_sigaction.go
3.273 KB
4 Dec 2025 6.06 PM
root / root
0644
cgocall.go
25.173 KB
4 Dec 2025 6.06 PM
root / root
0644
cgocallback.go
0.31 KB
4 Dec 2025 6.06 PM
root / root
0644
cgocheck.go
5.46 KB
4 Dec 2025 6.06 PM
root / root
0644
cgroup_linux.go
3.582 KB
4 Dec 2025 6.06 PM
root / root
0644
cgroup_stubs.go
0.591 KB
4 Dec 2025 6.06 PM
root / root
0644
chan.go
26.842 KB
4 Dec 2025 6.06 PM
root / root
0644
checkptr.go
3.574 KB
4 Dec 2025 6.06 PM
root / root
0644
compiler.go
0.4 KB
4 Dec 2025 6.06 PM
root / root
0644
complex.go
1.591 KB
4 Dec 2025 6.06 PM
root / root
0644
coro.go
8.315 KB
4 Dec 2025 6.06 PM
root / root
0644
covercounter.go
0.723 KB
4 Dec 2025 6.06 PM
root / root
0644
covermeta.go
0.589 KB
4 Dec 2025 6.06 PM
root / root
0644
cpuflags.go
0.999 KB
4 Dec 2025 6.06 PM
root / root
0644
cpuflags_amd64.go
1.092 KB
4 Dec 2025 6.06 PM
root / root
0644
cpuflags_arm64.go
0.305 KB
4 Dec 2025 6.06 PM
root / root
0644
cpuprof.go
8.523 KB
4 Dec 2025 6.06 PM
root / root
0644
cputicks.go
0.427 KB
4 Dec 2025 6.06 PM
root / root
0644
create_file_nounix.go
0.298 KB
4 Dec 2025 6.06 PM
root / root
0644
create_file_unix.go
0.359 KB
4 Dec 2025 6.06 PM
root / root
0644
debug.go
8.235 KB
4 Dec 2025 6.06 PM
root / root
0644
debugcall.go
7.132 KB
4 Dec 2025 6.06 PM
root / root
0644
debuglog.go
20.045 KB
4 Dec 2025 6.06 PM
root / root
0644
debuglog_off.go
0.432 KB
4 Dec 2025 6.06 PM
root / root
0644
debuglog_on.go
1.441 KB
4 Dec 2025 6.06 PM
root / root
0644
defs1_linux.go
0.825 KB
4 Dec 2025 6.06 PM
root / root
0644
defs1_netbsd_386.go
2.999 KB
4 Dec 2025 6.06 PM
root / root
0644
defs1_netbsd_amd64.go
3.229 KB
4 Dec 2025 6.06 PM
root / root
0644
defs1_netbsd_arm.go
3.116 KB
4 Dec 2025 6.06 PM
root / root
0644
defs1_netbsd_arm64.go
3.341 KB
4 Dec 2025 6.06 PM
root / root
0644
defs1_solaris_amd64.go
4.014 KB
4 Dec 2025 6.06 PM
root / root
0644
defs2_linux.go
3.218 KB
4 Dec 2025 6.06 PM
root / root
0644
defs3_linux.go
1.092 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_aix.go
4.175 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_aix_ppc64.go
3.625 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_arm_linux.go
2.67 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_darwin.go
4.297 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_darwin_amd64.go
6.434 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_darwin_arm64.go
4.257 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_dragonfly.go
2.851 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_dragonfly_amd64.go
3.499 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_freebsd.go
4.075 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_freebsd_386.go
4.614 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_freebsd_amd64.go
4.883 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_freebsd_arm.go
4.005 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_freebsd_arm64.go
4.269 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_freebsd_riscv64.go
4.279 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_illumos_amd64.go
0.278 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux.go
2.922 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_386.go
4.195 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_amd64.go
4.703 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_arm.go
3.888 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_arm64.go
3.62 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_loong64.go
3.451 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_mips64x.go
3.601 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_mipsx.go
3.602 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_ppc64.go
3.688 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_ppc64le.go
3.688 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_riscv64.go
3.814 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_s390x.go
3.162 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_netbsd.go
2.947 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_netbsd_386.go
0.835 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_netbsd_amd64.go
1.012 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_netbsd_arm.go
0.746 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_openbsd.go
3.058 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_openbsd_386.go
2.911 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_openbsd_amd64.go
3.111 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_openbsd_arm.go
3.026 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_openbsd_arm64.go
2.778 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_openbsd_mips64.go
2.755 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_openbsd_ppc64.go
3.001 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_openbsd_riscv64.go
2.891 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_plan9_386.go
1.627 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_plan9_amd64.go
1.816 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_plan9_arm.go
1.73 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_solaris.go
3.319 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_solaris_amd64.go
0.98 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_windows.go
2.534 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_windows_386.go
2.491 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_windows_amd64.go
3.394 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_windows_arm.go
2.956 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_windows_arm64.go
3.455 KB
4 Dec 2025 6.06 PM
root / root
0644
duff_386.s
8.236 KB
4 Dec 2025 6.06 PM
root / root
0644
duff_amd64.s
5.637 KB
4 Dec 2025 6.06 PM
root / root
0644
duff_arm.s
7.111 KB
4 Dec 2025 6.06 PM
root / root
0644
duff_arm64.s
5.273 KB
4 Dec 2025 6.06 PM
root / root
0644
duff_loong64.s
11.902 KB
4 Dec 2025 6.06 PM
root / root
0644
duff_mips64x.s
11.282 KB
4 Dec 2025 6.06 PM
root / root
0644
duff_ppc64x.s
7.056 KB
4 Dec 2025 6.06 PM
root / root
0644
duff_riscv64.s
11.402 KB
4 Dec 2025 6.06 PM
root / root
0644
duff_s390x.s
0.495 KB
4 Dec 2025 6.06 PM
root / root
0644
env_plan9.go
3.019 KB
4 Dec 2025 6.06 PM
root / root
0644
env_posix.go
2.131 KB
4 Dec 2025 6.06 PM
root / root
0644
error.go
10.387 KB
4 Dec 2025 6.06 PM
root / root
0644
extern.go
19.966 KB
4 Dec 2025 6.06 PM
root / root
0644
fastlog2.go
1.22 KB
4 Dec 2025 6.06 PM
root / root
0644
fastlog2table.go
0.883 KB
4 Dec 2025 6.06 PM
root / root
0644
fds_nonunix.go
0.25 KB
4 Dec 2025 6.06 PM
root / root
0644
fds_unix.go
1.27 KB
4 Dec 2025 6.06 PM
root / root
0644
fedora.go
0.242 KB
4 Dec 2025 6.06 PM
root / root
0644
float.go
2.922 KB
4 Dec 2025 6.06 PM
root / root
0644
funcdata.h
2.526 KB
4 Dec 2025 6.06 PM
root / root
0644
go_tls.h
0.357 KB
4 Dec 2025 6.06 PM
root / root
0644
hash32.go
1.584 KB
4 Dec 2025 6.06 PM
root / root
0644
hash64.go
1.894 KB
4 Dec 2025 6.06 PM
root / root
0644
heapdump.go
17.623 KB
4 Dec 2025 6.06 PM
root / root
0644
histogram.go
7.297 KB
4 Dec 2025 6.06 PM
root / root
0644
iface.go
21.337 KB
4 Dec 2025 6.06 PM
root / root
0644
ints.s
9.863 KB
4 Dec 2025 6.06 PM
root / root
0644
lfstack.go
1.686 KB
4 Dec 2025 6.06 PM
root / root
0644
libfuzzer.go
6.342 KB
4 Dec 2025 6.06 PM
root / root
0644
libfuzzer_amd64.s
5.026 KB
4 Dec 2025 6.06 PM
root / root
0644
libfuzzer_arm64.s
3.152 KB
4 Dec 2025 6.06 PM
root / root
0644
libfuzzer_loong64.s
3.24 KB
4 Dec 2025 6.06 PM
root / root
0644
linkname.go
0.786 KB
4 Dec 2025 6.06 PM
root / root
0644
linkname_swiss.go
6.674 KB
4 Dec 2025 6.06 PM
root / root
0644
linkname_unix.go
0.26 KB
4 Dec 2025 6.06 PM
root / root
0644
lock_futex.go
3.077 KB
4 Dec 2025 6.06 PM
root / root
0644
lock_js.go
7.078 KB
4 Dec 2025 6.06 PM
root / root
0644
lock_sema.go
4.146 KB
4 Dec 2025 6.06 PM
root / root
0644
lock_spinbit.go
14.618 KB
4 Dec 2025 6.06 PM
root / root
0644
lock_wasip1.go
2.063 KB
4 Dec 2025 6.06 PM
root / root
0644
lockrank.go
24.401 KB
4 Dec 2025 6.06 PM
root / root
0644
lockrank_off.go
1.299 KB
4 Dec 2025 6.06 PM
root / root
0644
lockrank_on.go
10.562 KB
4 Dec 2025 6.06 PM
root / root
0644
malloc.go
71.77 KB
4 Dec 2025 6.06 PM
root / root
0644
map_fast32_noswiss.go
13.967 KB
4 Dec 2025 6.06 PM
root / root
0644
map_fast32_swiss.go
1.712 KB
4 Dec 2025 6.06 PM
root / root
0644
map_fast64_noswiss.go
14.181 KB
4 Dec 2025 6.06 PM
root / root
0644
map_fast64_swiss.go
1.745 KB
4 Dec 2025 6.06 PM
root / root
0644
map_faststr_noswiss.go
15.409 KB
4 Dec 2025 6.06 PM
root / root
0644
map_faststr_swiss.go
1.327 KB
4 Dec 2025 6.06 PM
root / root
0644
map_noswiss.go
57.593 KB
4 Dec 2025 6.06 PM
root / root
0644
map_swiss.go
10.174 KB
4 Dec 2025 6.06 PM
root / root
0644
mbarrier.go
15.26 KB
4 Dec 2025 6.06 PM
root / root
0644
mbitmap.go
61.238 KB
4 Dec 2025 6.06 PM
root / root
0644
mcache.go
10.449 KB
4 Dec 2025 6.06 PM
root / root
0644
mcentral.go
7.837 KB
4 Dec 2025 6.06 PM
root / root
0644
mcheckmark.go
9.268 KB
4 Dec 2025 6.06 PM
root / root
0644
mcleanup.go
23.188 KB
4 Dec 2025 6.06 PM
root / root
0644
mem.go
7.337 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_aix.go
2.038 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_bsd.go
2.244 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_darwin.go
1.987 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_js.go
0.446 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_linux.go
5.222 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_nonsbrk.go
0.344 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_plan9.go
0.437 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_sbrk.go
6.113 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_wasip1.go
0.383 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_wasm.go
0.57 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_windows.go
3.905 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_386.s
2.381 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_amd64.s
4.906 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_arm.s
2.604 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_arm64.s
3.684 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_loong64.s
6.951 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_mips64x.s
1.722 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_mipsx.s
1.324 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_plan9_386.s
0.96 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_plan9_amd64.s
0.499 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_ppc64x.s
4.438 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_riscv64.s
1.705 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_s390x.s
3.558 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_wasm.s
0.474 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_386.s
4.419 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_amd64.s
12.874 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_arm.s
5.897 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_arm64.s
5.955 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_loong64.s
11.653 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_mips64x.s
1.826 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_mipsx.s
4.396 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_plan9_386.s
3.063 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_plan9_amd64.s
3.041 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_ppc64x.s
4.858 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_riscv64.s
5.461 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_s390x.s
2.918 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_wasm.s
0.468 KB
4 Dec 2025 6.06 PM
root / root
0644
metrics.go
25.988 KB
4 Dec 2025 6.06 PM
root / root
0644
mfinal.go
19.779 KB
4 Dec 2025 6.06 PM
root / root
0644
mfixalloc.go
3.127 KB
4 Dec 2025 6.06 PM
root / root
0644
mgc.go
64.943 KB
4 Dec 2025 6.06 PM
root / root
0644
mgclimit.go
17.241 KB
4 Dec 2025 6.06 PM
root / root
0644
mgcmark.go
55.107 KB
4 Dec 2025 6.06 PM
root / root
0644
mgcmark_greenteagc.go
27.73 KB
4 Dec 2025 6.06 PM
root / root
0644
mgcmark_nogreenteagc.go
2.204 KB
4 Dec 2025 6.06 PM
root / root
0644
mgcpacer.go
56.521 KB
4 Dec 2025 6.06 PM
root / root
0644
mgcscavenge.go
52.258 KB
4 Dec 2025 6.06 PM
root / root
0644
mgcstack.go
10.585 KB
4 Dec 2025 6.06 PM
root / root
0644
mgcsweep.go
32.938 KB
4 Dec 2025 6.06 PM
root / root
0644
mgcwork.go
14.936 KB
4 Dec 2025 6.06 PM
root / root
0644
mheap.go
97.843 KB
4 Dec 2025 6.06 PM
root / root
0644
minmax.go
1.458 KB
4 Dec 2025 6.06 PM
root / root
0644
mkduff.go
8.029 KB
4 Dec 2025 6.06 PM
root / root
0644
mkfastlog2table.go
3.075 KB
4 Dec 2025 6.06 PM
root / root
0644
mklockrank.go
9.474 KB
4 Dec 2025 6.06 PM
root / root
0644
mkpreempt.go
14.839 KB
4 Dec 2025 6.06 PM
root / root
0644
mmap.go
0.824 KB
4 Dec 2025 6.06 PM
root / root
0644
mpagealloc.go
39.259 KB
4 Dec 2025 6.06 PM
root / root
0644
mpagealloc_32bit.go
4.609 KB
4 Dec 2025 6.06 PM
root / root
0644
mpagealloc_64bit.go
9.406 KB
4 Dec 2025 6.06 PM
root / root
0644
mpagecache.go
5.593 KB
4 Dec 2025 6.06 PM
root / root
0644
mpallocbits.go
12.526 KB
4 Dec 2025 6.06 PM
root / root
0644
mprof.go
54.017 KB
4 Dec 2025 6.06 PM
root / root
0644
mranges.go
14.455 KB
4 Dec 2025 6.06 PM
root / root
0644
msan.go
1.622 KB
4 Dec 2025 6.06 PM
root / root
0644
msan0.go
0.708 KB
4 Dec 2025 6.06 PM
root / root
0644
msan_amd64.s
2.415 KB
4 Dec 2025 6.06 PM
root / root
0644
msan_arm64.s
2.091 KB
4 Dec 2025 6.06 PM
root / root
0644
msan_loong64.s
2.066 KB
4 Dec 2025 6.06 PM
root / root
0644
msize.go
1.351 KB
4 Dec 2025 6.06 PM
root / root
0644
mspanset.go
13.307 KB
4 Dec 2025 6.06 PM
root / root
0644
mstats.go
33.924 KB
4 Dec 2025 6.06 PM
root / root
0644
mwbbuf.go
8.184 KB
4 Dec 2025 6.06 PM
root / root
0644
nbpipe_pipe.go
0.396 KB
4 Dec 2025 6.06 PM
root / root
0644
nbpipe_pipe2.go
0.336 KB
4 Dec 2025 6.06 PM
root / root
0644
net_plan9.go
0.63 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll.go
20.81 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_aix.go
5.166 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_epoll.go
4.697 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_fake.go
0.648 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_kqueue.go
4.691 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_kqueue_event.go
1.778 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_kqueue_pipe.go
2.143 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_solaris.go
11.311 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_stub.go
1.579 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_wasip1.go
6.004 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_windows.go
9.491 KB
4 Dec 2025 6.06 PM
root / root
0644
nonwindows_stub.go
0.939 KB
4 Dec 2025 6.06 PM
root / root
0644
note_js.go
1.343 KB
4 Dec 2025 6.06 PM
root / root
0644
note_other.go
1.191 KB
4 Dec 2025 6.06 PM
root / root
0644
os2_aix.go
20.961 KB
4 Dec 2025 6.06 PM
root / root
0644
os2_freebsd.go
0.295 KB
4 Dec 2025 6.06 PM
root / root
0644
os2_openbsd.go
0.289 KB
4 Dec 2025 6.06 PM
root / root
0644
os2_plan9.go
1.481 KB
4 Dec 2025 6.06 PM
root / root
0644
os2_solaris.go
0.313 KB
4 Dec 2025 6.06 PM
root / root
0644
os3_plan9.go
3.977 KB
4 Dec 2025 6.06 PM
root / root
0644
os3_solaris.go
17.703 KB
4 Dec 2025 6.06 PM
root / root
0644
os_aix.go
9.052 KB
4 Dec 2025 6.06 PM
root / root
0644
os_android.go
0.452 KB
4 Dec 2025 6.06 PM
root / root
0644
os_darwin.go
11.864 KB
4 Dec 2025 6.06 PM
root / root
0644
os_darwin_arm64.go
0.321 KB
4 Dec 2025 6.06 PM
root / root
0644
os_dragonfly.go
7.312 KB
4 Dec 2025 6.06 PM
root / root
0644
os_freebsd.go
11.729 KB
4 Dec 2025 6.06 PM
root / root
0644
os_freebsd2.go
0.589 KB
4 Dec 2025 6.06 PM
root / root
0644
os_freebsd_amd64.go
0.643 KB
4 Dec 2025 6.06 PM
root / root
0644
os_freebsd_arm.go
1.466 KB
4 Dec 2025 6.06 PM
root / root
0644
os_freebsd_arm64.go
0.313 KB
4 Dec 2025 6.06 PM
root / root
0644
os_freebsd_noauxv.go
0.235 KB
4 Dec 2025 6.06 PM
root / root
0644
os_freebsd_riscv64.go
0.193 KB
4 Dec 2025 6.06 PM
root / root
0644
os_illumos.go
3.931 KB
4 Dec 2025 6.06 PM
root / root
0644
os_js.go
0.749 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux.go
27.048 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_arm.go
1.506 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_arm64.go
0.467 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_be64.go
0.787 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_generic.go
0.85 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_loong64.go
0.337 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_mips64x.go
0.973 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_mipsx.go
0.964 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_noauxv.go
0.329 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_novdso.go
0.339 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_ppc64x.go
0.514 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_riscv64.go
1.362 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_s390x.go
0.806 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_x86.go
0.229 KB
4 Dec 2025 6.06 PM
root / root
0644
os_netbsd.go
10.232 KB
4 Dec 2025 6.06 PM
root / root
0644
os_netbsd_386.go
0.603 KB
4 Dec 2025 6.06 PM
root / root
0644
os_netbsd_amd64.go
0.6 KB
4 Dec 2025 6.06 PM
root / root
0644
os_netbsd_arm.go
1.094 KB
4 Dec 2025 6.06 PM
root / root
0644
os_netbsd_arm64.go
0.751 KB
4 Dec 2025 6.06 PM
root / root
0644
os_nonopenbsd.go
0.427 KB
4 Dec 2025 6.06 PM
root / root
0644
os_only_solaris.go
0.353 KB
4 Dec 2025 6.06 PM
root / root
0644
os_openbsd.go
6.447 KB
4 Dec 2025 6.06 PM
root / root
0644
os_openbsd_arm.go
0.667 KB
4 Dec 2025 6.06 PM
root / root
0644
os_openbsd_arm64.go
0.321 KB
4 Dec 2025 6.06 PM
root / root
0644
os_openbsd_libc.go
1.488 KB
4 Dec 2025 6.06 PM
root / root
0644
os_openbsd_mips64.go
0.321 KB
4 Dec 2025 6.06 PM
root / root
0644
os_openbsd_syscall.go
1.359 KB
4 Dec 2025 6.06 PM
root / root
0644
os_openbsd_syscall1.go
0.431 KB
4 Dec 2025 6.06 PM
root / root
0644
os_openbsd_syscall2.go
2.511 KB
4 Dec 2025 6.06 PM
root / root
0644
os_plan9.go
11.943 KB
4 Dec 2025 6.06 PM
root / root
0644
os_plan9_arm.go
0.366 KB
4 Dec 2025 6.06 PM
root / root
0644
os_solaris.go
6.707 KB
4 Dec 2025 6.06 PM
root / root
0644
os_unix.go
0.426 KB
4 Dec 2025 6.06 PM
root / root
0644
os_unix_nonlinux.go
0.505 KB
4 Dec 2025 6.06 PM
root / root
0644
os_wasip1.go
6.88 KB
4 Dec 2025 6.06 PM
root / root
0644
os_wasm.go
3.314 KB
4 Dec 2025 6.06 PM
root / root
0644
os_windows.go
40.658 KB
4 Dec 2025 6.06 PM
root / root
0644
os_windows_arm.go
0.499 KB
4 Dec 2025 6.06 PM
root / root
0644
os_windows_arm64.go
0.331 KB
4 Dec 2025 6.06 PM
root / root
0644
panic.go
45.134 KB
4 Dec 2025 6.06 PM
root / root
0644
panic32.go
4.895 KB
4 Dec 2025 6.06 PM
root / root
0644
pinner.go
10.994 KB
4 Dec 2025 6.06 PM
root / root
0644
plugin.go
4.394 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt.go
15.458 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_386.s
0.805 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_amd64.s
1.541 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_arm.s
1.487 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_arm64.s
1.967 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_loong64.s
2.411 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_mips64x.s
2.716 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_mipsx.s
2.681 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_nonwindows.go
0.283 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_ppc64x.s
2.716 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_riscv64.s
2.258 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_s390x.s
1.009 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_wasm.s
0.172 KB
4 Dec 2025 6.06 PM
root / root
0644
print.go
5.921 KB
4 Dec 2025 6.06 PM
root / root
0644
proc.go
220.345 KB
4 Dec 2025 6.06 PM
root / root
0644
profbuf.go
18.203 KB
4 Dec 2025 6.06 PM
root / root
0644
proflabel.go
2.059 KB
4 Dec 2025 6.06 PM
root / root
0644
race.go
22.501 KB
4 Dec 2025 6.06 PM
root / root
0644
race0.go
2.894 KB
4 Dec 2025 6.06 PM
root / root
0644
race_amd64.s
15.17 KB
4 Dec 2025 6.06 PM
root / root
0644
race_arm64.s
15.554 KB
4 Dec 2025 6.06 PM
root / root
0644
race_loong64.s
15.241 KB
4 Dec 2025 6.06 PM
root / root
0644
race_ppc64le.s
17.035 KB
4 Dec 2025 6.06 PM
root / root
0644
race_s390x.s
13.131 KB
4 Dec 2025 6.06 PM
root / root
0644
rand.go
8.788 KB
4 Dec 2025 6.06 PM
root / root
0644
rdebug.go
0.537 KB
4 Dec 2025 6.06 PM
root / root
0644
retry.go
0.742 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_aix_ppc64.s
5.056 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_android_386.s
0.803 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_android_amd64.s
0.736 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_android_arm.s
0.823 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_android_arm64.s
0.919 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_darwin_amd64.s
0.39 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_darwin_arm64.s
1.688 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_dragonfly_amd64.s
0.438 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_freebsd_386.s
0.443 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_freebsd_amd64.s
0.432 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_freebsd_arm.s
0.291 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_freebsd_arm64.s
1.879 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_freebsd_riscv64.s
2.721 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_illumos_amd64.s
0.304 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_ios_amd64.s
0.415 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_ios_arm64.s
0.415 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_js_wasm.s
1.431 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_386.s
0.439 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_amd64.s
0.3 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_arm.s
0.983 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_arm64.s
1.809 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_loong64.s
2.009 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_mips64x.s
0.99 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_mipsx.s
0.778 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_ppc64.s
0.827 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_ppc64le.s
2.887 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_riscv64.s
2.648 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_s390x.s
0.66 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_netbsd_386.s
0.441 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_netbsd_amd64.s
0.302 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_netbsd_arm.s
0.289 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_netbsd_arm64.s
1.803 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_openbsd_386.s
0.443 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_openbsd_amd64.s
0.304 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_openbsd_arm.s
0.291 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_openbsd_arm64.s
1.961 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_openbsd_mips64.s
0.953 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_openbsd_ppc64.s
0.361 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_openbsd_riscv64.s
0.363 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_plan9_386.s
0.511 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_plan9_amd64.s
0.47 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_plan9_arm.s
0.388 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_solaris_amd64.s
0.304 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_wasip1_wasm.s
0.453 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_windows_386.s
1.28 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_windows_amd64.s
1.139 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_windows_arm.s
0.377 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_windows_arm64.s
0.716 KB
4 Dec 2025 6.06 PM
root / root
0644
runtime-gdb.py
18.864 KB
4 Dec 2025 6.06 PM
root / root
0644
runtime.go
9.768 KB
4 Dec 2025 6.06 PM
root / root
0644
runtime1.go
20.791 KB
4 Dec 2025 6.06 PM
root / root
0644
runtime2.go
50.123 KB
4 Dec 2025 6.06 PM
root / root
0644
runtime_boring.go
0.447 KB
4 Dec 2025 6.06 PM
root / root
0644
rwmutex.go
4.984 KB
4 Dec 2025 6.06 PM
root / root
0644
security_aix.go
0.438 KB
4 Dec 2025 6.06 PM
root / root
0644
security_issetugid.go
0.49 KB
4 Dec 2025 6.06 PM
root / root
0644
security_linux.go
0.327 KB
4 Dec 2025 6.06 PM
root / root
0644
security_nonunix.go
0.25 KB
4 Dec 2025 6.06 PM
root / root
0644
security_unix.go
0.846 KB
4 Dec 2025 6.06 PM
root / root
0644
select.go
15.398 KB
4 Dec 2025 6.06 PM
root / root
0644
sema.go
20.174 KB
4 Dec 2025 6.06 PM
root / root
0644
set_vma_name_linux.go
0.936 KB
4 Dec 2025 6.06 PM
root / root
0644
set_vma_name_stub.go
0.355 KB
4 Dec 2025 6.06 PM
root / root
0644
sigaction.go
0.489 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_386.go
1.718 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_aix_ppc64.go
3.545 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_amd64.go
2.726 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_arm.go
2.543 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_arm64.go
3.828 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_darwin.go
2.128 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_darwin_amd64.go
4.004 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_darwin_arm64.go
3.598 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_dragonfly.go
2.171 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_dragonfly_amd64.go
2.015 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_freebsd.go
2.202 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_freebsd_386.go
1.551 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_freebsd_amd64.go
2.03 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_freebsd_arm.go
2.179 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_freebsd_arm64.go
3.237 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_freebsd_riscv64.go
3.075 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_386.go
1.592 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_amd64.go
2.051 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_arm.go
2.123 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_arm64.go
2.945 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_loong64.go
3.216 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_mips64x.go
3.35 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_mipsx.go
3.667 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_ppc64x.go
3.501 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_riscv64.go
2.921 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_s390x.go
4.485 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_loong64.go
3.072 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_mips64x.go
3.181 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_mipsx.go
3.06 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_netbsd.go
2.181 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_netbsd_386.go
1.757 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_netbsd_amd64.go
2.325 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_netbsd_arm.go
2.301 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_netbsd_arm64.go
3.404 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_openbsd.go
2.18 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_openbsd_386.go
1.585 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_openbsd_amd64.go
2.036 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_openbsd_arm.go
2.117 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_openbsd_arm64.go
3.391 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_openbsd_mips64.go
3.282 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_openbsd_ppc64.go
3.53 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_openbsd_riscv64.go
3.12 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_plan9.go
1.934 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_ppc64x.go
3.708 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_riscv64.go
2.91 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_solaris.go
4.501 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_solaris_amd64.go
2.466 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_unix.go
45.658 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_windows.go
14.353 KB
4 Dec 2025 6.06 PM
root / root
0644
sigqueue.go
7.618 KB
4 Dec 2025 6.06 PM
root / root
0644
sigqueue_note.go
0.633 KB
4 Dec 2025 6.06 PM
root / root
0644
sigqueue_plan9.go
3.254 KB
4 Dec 2025 6.06 PM
root / root
0644
sigtab_aix.go
11.304 KB
4 Dec 2025 6.06 PM
root / root
0644
sigtab_linux_generic.go
3.518 KB
4 Dec 2025 6.06 PM
root / root
0644
sigtab_linux_mipsx.go
5.953 KB
4 Dec 2025 6.06 PM
root / root
0644
slice.go
12.204 KB
4 Dec 2025 6.06 PM
root / root
0644
softfloat64.go
11.536 KB
4 Dec 2025 6.06 PM
root / root
0644
stack.go
42.74 KB
4 Dec 2025 6.06 PM
root / root
0644
stkframe.go
9.771 KB
4 Dec 2025 6.06 PM
root / root
0644
string.go
13.166 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs.go
18.087 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs2.go
1.146 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs3.go
0.316 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_386.go
0.691 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_amd64.go
1.384 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_arm.go
0.673 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_arm64.go
0.684 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_linux.go
0.635 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_loong64.go
0.623 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_mips64x.go
0.51 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_mipsx.go
0.431 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_nonlinux.go
0.291 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_nonwasm.go
0.271 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_ppc64.go
0.295 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_ppc64x.go
0.672 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_riscv64.go
0.679 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_s390x.go
0.404 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_wasm.go
0.691 KB
4 Dec 2025 6.06 PM
root / root
0644
symtab.go
40.96 KB
4 Dec 2025 6.06 PM
root / root
0644
symtabinl.go
4.526 KB
4 Dec 2025 6.06 PM
root / root
0644
synctest.go
12.779 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_aix_ppc64.s
7.42 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_arm.go
0.509 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_arm64.go
0.458 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_darwin.go
24.438 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_darwin_amd64.s
19.855 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_darwin_arm64.go
1.738 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_darwin_arm64.s
18.422 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_dragonfly_amd64.s
8.31 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_freebsd_386.s
9.409 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_freebsd_amd64.s
12.675 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_freebsd_arm.s
10.378 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_freebsd_arm64.s
9.493 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_freebsd_riscv64.s
8.918 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_libc.go
1.878 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_386.s
17.89 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_amd64.s
16.357 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_arm.s
13.502 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_arm64.s
17.529 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_loong64.s
16.812 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_mips64x.s
11.965 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_mipsx.s
9.69 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_ppc64x.s
18.909 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_riscv64.s
10.523 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_s390x.s
13.451 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_loong64.go
0.478 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_mips64x.go
0.488 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_mipsx.go
0.484 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_netbsd_386.s
9.608 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_netbsd_amd64.s
9.782 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_netbsd_arm.s
10.576 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_netbsd_arm64.s
9.469 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_nonppc64x.go
0.239 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd.go
2.593 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd1.go
1.229 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd2.go
8.671 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd3.go
4.069 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd_386.s
20.4 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd_amd64.s
15.539 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd_arm.s
18.461 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd_arm64.s
15.053 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd_mips64.s
8.807 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd_ppc64.s
15.297 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd_riscv64.s
16.802 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_plan9_386.s
4.335 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_plan9_amd64.s
4.732 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_plan9_arm.s
6.798 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_ppc64x.go
0.52 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_riscv64.go
0.458 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_s390x.go
0.458 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_solaris_amd64.s
6.418 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_wasm.go
1.127 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_wasm.s
1.521 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_windows_386.s
6.457 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_windows_amd64.s
8.418 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_windows_arm.s
7.744 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_windows_arm64.s
6.797 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_x86.go
0.539 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall2_solaris.go
1.85 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_aix.go
6.332 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_solaris.go
8.383 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_windows.go
16.67 KB
4 Dec 2025 6.06 PM
root / root
0644
tagptr.go
0.891 KB
4 Dec 2025 6.06 PM
root / root
0644
tagptr_32bit.go
0.964 KB
4 Dec 2025 6.06 PM
root / root
0644
tagptr_64bit.go
3.127 KB
4 Dec 2025 6.06 PM
root / root
0644
test_amd64.go
0.191 KB
4 Dec 2025 6.06 PM
root / root
0644
test_amd64.s
0.309 KB
4 Dec 2025 6.06 PM
root / root
0644
test_stubs.go
0.213 KB
4 Dec 2025 6.06 PM
root / root
0644
textflag.h
1.466 KB
4 Dec 2025 6.06 PM
root / root
0644
time.go
43.854 KB
4 Dec 2025 6.06 PM
root / root
0644
time_fake.go
2.521 KB
4 Dec 2025 6.06 PM
root / root
0644
time_linux_amd64.s
2.019 KB
4 Dec 2025 6.06 PM
root / root
0644
time_nofake.go
1.568 KB
4 Dec 2025 6.06 PM
root / root
0644
time_plan9.go
0.629 KB
4 Dec 2025 6.06 PM
root / root
0644
time_windows.h
0.735 KB
4 Dec 2025 6.06 PM
root / root
0644
time_windows_386.s
1.707 KB
4 Dec 2025 6.06 PM
root / root
0644
time_windows_amd64.s
0.768 KB
4 Dec 2025 6.06 PM
root / root
0644
time_windows_arm.s
1.974 KB
4 Dec 2025 6.06 PM
root / root
0644
time_windows_arm64.s
0.885 KB
4 Dec 2025 6.06 PM
root / root
0644
timeasm.go
0.408 KB
4 Dec 2025 6.06 PM
root / root
0644
timestub.go
0.878 KB
4 Dec 2025 6.06 PM
root / root
0644
timestub2.go
0.364 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_arm.s
3.451 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_arm64.h
1.098 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_arm64.s
1.199 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_loong64.s
0.575 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_mips64x.s
0.716 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_mipsx.s
0.693 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_ppc64x.s
1.523 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_riscv64.s
0.601 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_s390x.s
1.546 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_stub.go
0.254 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_windows_amd64.go
0.287 KB
4 Dec 2025 6.06 PM
root / root
0644
trace.go
38.343 KB
4 Dec 2025 6.06 PM
root / root
0644
traceallocfree.go
5.998 KB
4 Dec 2025 6.06 PM
root / root
0644
traceback.go
56.618 KB
4 Dec 2025 6.06 PM
root / root
0644
tracebuf.go
10.405 KB
4 Dec 2025 6.06 PM
root / root
0644
tracecpu.go
8.79 KB
4 Dec 2025 6.06 PM
root / root
0644
traceevent.go
3.685 KB
4 Dec 2025 6.06 PM
root / root
0644
tracemap.go
4.529 KB
4 Dec 2025 6.06 PM
root / root
0644
traceregion.go
3.402 KB
4 Dec 2025 6.06 PM
root / root
0644
traceruntime.go
25.478 KB
4 Dec 2025 6.06 PM
root / root
0644
tracestack.go
11.361 KB
4 Dec 2025 6.06 PM
root / root
0644
tracestatus.go
6.927 KB
4 Dec 2025 6.06 PM
root / root
0644
tracestring.go
2.438 KB
4 Dec 2025 6.06 PM
root / root
0644
tracetime.go
3.829 KB
4 Dec 2025 6.06 PM
root / root
0644
tracetype.go
2.279 KB
4 Dec 2025 6.06 PM
root / root
0644
type.go
17.42 KB
4 Dec 2025 6.06 PM
root / root
0644
typekind.go
0.348 KB
4 Dec 2025 6.06 PM
root / root
0644
unsafe.go
3.17 KB
4 Dec 2025 6.06 PM
root / root
0644
utf8.go
3.386 KB
4 Dec 2025 6.06 PM
root / root
0644
valgrind.go
5.013 KB
4 Dec 2025 6.06 PM
root / root
0644
valgrind0.go
1.116 KB
4 Dec 2025 6.06 PM
root / root
0644
valgrind_amd64.s
1.266 KB
4 Dec 2025 6.06 PM
root / root
0644
valgrind_arm64.s
0.763 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_elf32.go
2.761 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_elf64.go
2.836 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_freebsd.go
2.443 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_freebsd_arm.go
0.443 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_freebsd_arm64.go
0.443 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_freebsd_riscv64.go
0.419 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_freebsd_x86.go
1.856 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_in_none.go
0.433 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux.go
7.786 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux_386.go
0.653 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux_amd64.go
0.888 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux_arm.go
0.653 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux_arm64.go
0.712 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux_loong64.go
0.824 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux_mips64x.go
0.83 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux_ppc64x.go
0.709 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux_riscv64.go
0.65 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux_s390x.go
0.696 KB
4 Dec 2025 6.06 PM
root / root
0644
vgetrandom_linux.go
3.825 KB
4 Dec 2025 6.06 PM
root / root
0644
vgetrandom_unsupported.go
0.45 KB
4 Dec 2025 6.06 PM
root / root
0644
vlop_386.s
2.018 KB
4 Dec 2025 6.06 PM
root / root
0644
vlop_arm.s
7.063 KB
4 Dec 2025 6.06 PM
root / root
0644
vlrt.go
6.712 KB
4 Dec 2025 6.06 PM
root / root
0644
wincallback.go
3.454 KB
4 Dec 2025 6.06 PM
root / root
0644
write_err.go
0.289 KB
4 Dec 2025 6.06 PM
root / root
0644
write_err_android.go
4.59 KB
4 Dec 2025 6.06 PM
root / root
0644
zcallback_windows.go
0.151 KB
4 Dec 2025 6.06 PM
root / root
0644
zcallback_windows.s
63.057 KB
4 Dec 2025 6.06 PM
root / root
0644
zcallback_windows_arm.s
89.323 KB
4 Dec 2025 6.06 PM
root / root
0644
zcallback_windows_arm64.s
89.323 KB
4 Dec 2025 6.06 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF