From e984240d310302764c66bb4bf84b5747e05cf8ef Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 5 Nov 2021 23:50:55 +0900 Subject: [PATCH] runtime: fix unworkable comments for go:nosplit Change-Id: I71c29a2dc7e5b2b6bc35093535228d2907b16b47 Reviewed-on: https://go-review.googlesource.com/c/go/+/361595 Run-TryBot: Ian Lance Taylor TryBot-Result: Go Bot Reviewed-by: Ian Lance Taylor Trust: Hajime Hoshi --- src/runtime/sys_darwin.go | 2 +- src/runtime/sys_openbsd2.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/sys_darwin.go b/src/runtime/sys_darwin.go index 0f91685d6ca..9af4cf18f8d 100644 --- a/src/runtime/sys_darwin.go +++ b/src/runtime/sys_darwin.go @@ -156,7 +156,7 @@ func pthread_kill_trampoline() // mmap is used to do low-level memory allocation via mmap. Don't allow stack // splits, since this function (used by sysAlloc) is called in a lot of low-level // parts of the runtime and callers often assume it won't acquire any locks. -// go:nosplit +//go:nosplit func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) (unsafe.Pointer, int) { args := struct { addr unsafe.Pointer diff --git a/src/runtime/sys_openbsd2.go b/src/runtime/sys_openbsd2.go index 7024cfa86d2..c936fbb494a 100644 --- a/src/runtime/sys_openbsd2.go +++ b/src/runtime/sys_openbsd2.go @@ -45,7 +45,7 @@ func thrkill_trampoline() // mmap is used to do low-level memory allocation via mmap. Don't allow stack // splits, since this function (used by sysAlloc) is called in a lot of low-level // parts of the runtime and callers often assume it won't acquire any locks. -// go:nosplit +//go:nosplit func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) (unsafe.Pointer, int) { args := struct { addr unsafe.Pointer