diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2018-11-02 15:18:43 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2018-11-02 22:47:58 +0000 |
| commit | 3813edf26edb78620632dc9c7d66096e5b2b5019 (patch) | |
| tree | 7b61738f970909800472f3ab5d00e90ddd0d405e /src/runtime/proc.go | |
| parent | e25823edcea364df70b8db7462f53e7dac2b8fca (diff) | |
| download | go-3813edf26edb78620632dc9c7d66096e5b2b5019.tar.xz | |
all: use "reports whether" consistently in the few places that didn't
Go documentation style for boolean funcs is to say:
// Foo reports whether ...
func Foo() bool
(rather than "returns true if")
This CL also replaces 4 uses of "iff" with the same "reports whether"
wording, which doesn't lose any meaning, and will prevent people from
sending typo fixes when they don't realize it's "if and only if". In
the past I think we've had the typo CLs updated to just say "reports
whether". So do them all at once.
(Inspired by the addition of another "returns true if" in CL 146938
in fd_plan9.go)
Created with:
$ perl -i -npe 's/returns true if/reports whether/' $(git grep -l "returns true iff" | grep -v vendor)
$ perl -i -npe 's/returns true if/reports whether/' $(git grep -l "returns true if" | grep -v vendor)
Change-Id: Ided502237f5ab0d25cb625dbab12529c361a8b9f
Reviewed-on: https://go-review.googlesource.com/c/147037
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/proc.go')
| -rw-r--r-- | src/runtime/proc.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go index 542cf1ed70..864efcdfed 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -2400,7 +2400,7 @@ stop: goto top } -// pollWork returns true if there is non-background work this P could +// pollWork reports whether there is non-background work this P could // be doing. This is a fairly lightweight check to be used for // background work loops, like idle GC. It checks a subset of the // conditions checked by the actual scheduler. @@ -4713,7 +4713,7 @@ func pidleget() *p { return _p_ } -// runqempty returns true if _p_ has no Gs on its local run queue. +// runqempty reports whether _p_ has no Gs on its local run queue. // It never returns true spuriously. func runqempty(_p_ *p) bool { // Defend against a race where 1) _p_ has G1 in runqnext but runqhead == runqtail, @@ -4934,7 +4934,7 @@ type gQueue struct { tail guintptr } -// empty returns true if q is empty. +// empty reports whether q is empty. func (q *gQueue) empty() bool { return q.head == 0 } @@ -5000,7 +5000,7 @@ type gList struct { head guintptr } -// empty returns true if l is empty. +// empty reports whether l is empty. func (l *gList) empty() bool { return l.head == 0 } |
