aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/os_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/os_linux.go')
-rw-r--r--src/runtime/os_linux.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/runtime/os_linux.go b/src/runtime/os_linux.go
index efb54ff20e..812a0b4ad3 100644
--- a/src/runtime/os_linux.go
+++ b/src/runtime/os_linux.go
@@ -55,6 +55,7 @@ const (
// if(*addr == val) sleep
// Might be woken up spuriously; that's allowed.
// Don't sleep longer than ns; ns < 0 means forever.
+//
//go:nosplit
func futexsleep(addr *uint32, val uint32, ns int64) {
// Some Linux kernels have a bug where futex of
@@ -73,6 +74,7 @@ func futexsleep(addr *uint32, val uint32, ns int64) {
}
// If any procs are sleeping on addr, wake up at most cnt.
+//
//go:nosplit
func futexwakeup(addr *uint32, cnt uint32) {
ret := futex(unsafe.Pointer(addr), _FUTEX_WAKE_PRIVATE, cnt, nil, nil, 0)
@@ -157,6 +159,7 @@ const (
func clone(flags int32, stk, mp, gp, fn unsafe.Pointer) int32
// May run with m.p==nil, so write barriers are not allowed.
+//
//go:nowritebarrier
func newosproc(mp *m) {
stk := unsafe.Pointer(mp.g0.stack.hi)
@@ -184,6 +187,7 @@ func newosproc(mp *m) {
}
// Version of newosproc that doesn't require a valid G.
+//
//go:nosplit
func newosproc0(stacksize uintptr, fn unsafe.Pointer) {
stack := sysAlloc(stacksize, &memstats.stacks_sys)
@@ -365,6 +369,7 @@ func goenvs() {
// Called to do synchronous initialization of Go code built with
// -buildmode=c-archive or -buildmode=c-shared.
// None of the Go runtime is initialized.
+//
//go:nosplit
//go:nowritebarrierrec
func libpreinit() {
@@ -392,6 +397,7 @@ func minit() {
}
// Called from dropm to undo the effect of an minit.
+//
//go:nosplit
func unminit() {
unminitSignals()
@@ -497,6 +503,7 @@ func getsig(i uint32) uintptr {
}
// setSignaltstackSP sets the ss_sp field of a stackt.
+//
//go:nosplit
func setSignalstackSP(s *stackt, sp uintptr) {
*(*uintptr)(unsafe.Pointer(&s.ss_sp)) = sp
@@ -507,6 +514,7 @@ func (c *sigctxt) fixsigcode(sig uint32) {
}
// sysSigaction calls the rt_sigaction system call.
+//
//go:nosplit
func sysSigaction(sig uint32, new, old *sigactiont) {
if rt_sigaction(uintptr(sig), new, old, unsafe.Sizeof(sigactiont{}.sa_mask)) != 0 {
@@ -531,6 +539,7 @@ func sysSigaction(sig uint32, new, old *sigactiont) {
}
// rt_sigaction is implemented in assembly.
+//
//go:noescape
func rt_sigaction(sig uintptr, new, old *sigactiont, size uintptr) int32