aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/exec_plan9.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2022-01-30 20:13:43 -0500
committerRuss Cox <rsc@golang.org>2022-04-05 17:54:15 +0000
commit9839668b5619f45e293dd40339bf0ac614ea6bee (patch)
treea836ea07d0a9ec5e32638d060cdeb6b4ded636dc /src/syscall/exec_plan9.go
parent81431c7aa7c5d782e72dec342442ea7664ef1783 (diff)
downloadgo-9839668b5619f45e293dd40339bf0ac614ea6bee.tar.xz
all: separate doc comment from //go: directives
A future change to gofmt will rewrite // Doc comment. //go:foo to // Doc comment. // //go:foo Apply that change preemptively to all comments (not necessarily just doc comments). For #51082. Change-Id: Iffe0285418d1e79d34526af3520b415a12203ca9 Reviewed-on: https://go-review.googlesource.com/c/go/+/384260 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/syscall/exec_plan9.go')
-rw-r--r--src/syscall/exec_plan9.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/syscall/exec_plan9.go b/src/syscall/exec_plan9.go
index c469fe1812..6680e6f2ef 100644
--- a/src/syscall/exec_plan9.go
+++ b/src/syscall/exec_plan9.go
@@ -19,6 +19,7 @@ var ForkLock sync.RWMutex
// gstringb reads a non-empty string from b, prefixed with a 16-bit length in little-endian order.
// It returns the string as a byte slice, or nil if b is too short to contain the length or
// the full string.
+//
//go:nosplit
func gstringb(b []byte) []byte {
if len(b) < 2 {
@@ -37,6 +38,7 @@ const nameOffset = 39
// gdirname returns the first filename from a buffer of directory entries,
// and a slice containing the remaining directory entries.
// If the buffer doesn't start with a valid directory entry, the returned name is nil.
+//
//go:nosplit
func gdirname(buf []byte) (name []byte, rest []byte) {
if len(buf) < 2 {
@@ -119,6 +121,7 @@ var dupdev, _ = BytePtrFromString("#d")
// no rescheduling, no malloc calls, and no new stack segments.
// The calls to RawSyscall are okay because they are assembly
// functions that do not grow the stack.
+//
//go:norace
func forkAndExecInChild(argv0 *byte, argv []*byte, envv []envItem, dir *byte, attr *ProcAttr, pipe int, rflag int) (pid int, err error) {
// Declare all variables at top in case any
@@ -302,6 +305,7 @@ childerror1:
}
// close the numbered file descriptor, unless it is fd1, fd2, or a member of fds.
+//
//go:nosplit
func closeFdExcept(n int, fd1 int, fd2 int, fds []int) {
if n == fd1 || n == fd2 {