runtime: fix a few function names on comments

Change-Id: I4be0b1e612dcc21ca6bb7d4395f1c0aa52480759
GitHub-Last-Rev: 032480c4c9
GitHub-Pull-Request: golang/go#55993
Reviewed-on: https://go-review.googlesource.com/c/go/+/437518
Reviewed-by: hopehook <hopehook@golangcn.org>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: hopehook <hopehook@golangcn.org>
This commit is contained in:
cui fliter 2022-10-03 01:32:11 +00:00 committed by Meng Zhuo
parent 5d59fa143a
commit 069d1fc9e2
13 changed files with 21 additions and 21 deletions

View file

@ -17,7 +17,7 @@ const (
nameOffset = 39 nameOffset = 39
) )
// Goenvs caches the Plan 9 environment variables at start of execution into // goenvs caches the Plan 9 environment variables at start of execution into
// string array envs, to supply the initial contents for os.Environ. // string array envs, to supply the initial contents for os.Environ.
// Subsequent calls to os.Setenv will change this cache, without writing back // Subsequent calls to os.Setenv will change this cache, without writing back
// to the (possibly shared) Plan 9 environment, so that Setenv and Getenv // to the (possibly shared) Plan 9 environment, so that Setenv and Getenv
@ -70,7 +70,7 @@ func goenvs() {
}) })
} }
// Dofiles reads the directory opened with file descriptor fd, applying function f // dofiles reads the directory opened with file descriptor fd, applying function f
// to each filename in it. // to each filename in it.
// //
//go:nosplit //go:nosplit
@ -95,7 +95,7 @@ func dofiles(dirfd int32, f func([]byte)) {
} }
} }
// Gdirname returns the first filename from a buffer of directory entries, // gdirname returns the first filename from a buffer of directory entries,
// and a slice containing the remaining 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. // If the buffer doesn't start with a valid directory entry, the returned name is nil.
// //
@ -117,7 +117,7 @@ func gdirname(buf []byte) (name []byte, rest []byte) {
return return
} }
// Gbit16 reads a 16-bit little-endian binary number from b and returns it // gbit16 reads a 16-bit little-endian binary number from b and returns it
// with the remaining slice of b. // with the remaining slice of b.
// //
//go:nosplit //go:nosplit

View file

@ -24,12 +24,12 @@ func isInf(f float64) bool {
return !isNaN(f) && !isFinite(f) return !isNaN(f) && !isFinite(f)
} }
// Abs returns the absolute value of x. // abs returns the absolute value of x.
// //
// Special cases are: // Special cases are:
// //
// Abs(±Inf) = +Inf // abs(±Inf) = +Inf
// Abs(NaN) = NaN // abs(NaN) = NaN
func abs(x float64) float64 { func abs(x float64) float64 {
const sign = 1 << 63 const sign = 1 << 63
return float64frombits(float64bits(x) &^ sign) return float64frombits(float64bits(x) &^ sign)
@ -42,12 +42,12 @@ func copysign(x, y float64) float64 {
return float64frombits(float64bits(x)&^sign | float64bits(y)&sign) return float64frombits(float64bits(x)&^sign | float64bits(y)&sign)
} }
// Float64bits returns the IEEE 754 binary representation of f. // float64bits returns the IEEE 754 binary representation of f.
func float64bits(f float64) uint64 { func float64bits(f float64) uint64 {
return *(*uint64)(unsafe.Pointer(&f)) return *(*uint64)(unsafe.Pointer(&f))
} }
// Float64frombits returns the floating point number corresponding // float64frombits returns the floating point number corresponding
// the IEEE 754 binary representation b. // the IEEE 754 binary representation b.
func float64frombits(b uint64) float64 { func float64frombits(b uint64) float64 {
return *(*float64)(unsafe.Pointer(&b)) return *(*float64)(unsafe.Pointer(&b))

View file

@ -196,7 +196,7 @@ func reflectlite_typedmemmove(typ *_type, dst, src unsafe.Pointer) {
reflect_typedmemmove(typ, dst, src) reflect_typedmemmove(typ, dst, src)
} }
// typedmemmovepartial is like typedmemmove but assumes that // reflect_typedmemmovepartial is like typedmemmove but assumes that
// dst and src point off bytes into the value and only copies size bytes. // dst and src point off bytes into the value and only copies size bytes.
// off must be a multiple of goarch.PtrSize. // off must be a multiple of goarch.PtrSize.
// //

View file

@ -364,7 +364,7 @@ func findObject(p, refBase, refOff uintptr) (base uintptr, s *mspan, objIndex ui
return return
} }
// verifyNotInHeapPtr reports whether converting the not-in-heap pointer into a unsafe.Pointer is ok. // reflect_verifyNotInHeapPtr reports whether converting the not-in-heap pointer into a unsafe.Pointer is ok.
// //
//go:linkname reflect_verifyNotInHeapPtr reflect.verifyNotInHeapPtr //go:linkname reflect_verifyNotInHeapPtr reflect.verifyNotInHeapPtr
func reflect_verifyNotInHeapPtr(p uintptr) bool { func reflect_verifyNotInHeapPtr(p uintptr) bool {
@ -1409,7 +1409,7 @@ func getgcmaskcb(frame *stkframe, ctxt unsafe.Pointer) bool {
return true return true
} }
// gcbits returns the GC type info for x, for testing. // reflect_gcbits returns the GC type info for x, for testing.
// The result is the bitmap entries (0 or 1), one entry per byte. // The result is the bitmap entries (0 or 1), one entry per byte.
// //
//go:linkname reflect_gcbits reflect.gcbits //go:linkname reflect_gcbits reflect.gcbits

View file

@ -106,7 +106,7 @@ func chunkIndex(p uintptr) chunkIdx {
return chunkIdx((p - arenaBaseOffset) / pallocChunkBytes) return chunkIdx((p - arenaBaseOffset) / pallocChunkBytes)
} }
// chunkIndex returns the base address of the palloc chunk at index ci. // chunkBase returns the base address of the palloc chunk at index ci.
func chunkBase(ci chunkIdx) uintptr { func chunkBase(ci chunkIdx) uintptr {
return uintptr(ci)*pallocChunkBytes + arenaBaseOffset return uintptr(ci)*pallocChunkBytes + arenaBaseOffset
} }

View file

@ -268,7 +268,7 @@ func getsig(i uint32) uintptr {
return *((*uintptr)(unsafe.Pointer(&sa._funcptr))) return *((*uintptr)(unsafe.Pointer(&sa._funcptr)))
} }
// setSignaltstackSP sets the ss_sp field of a stackt. // setSignalstackSP sets the ss_sp field of a stackt.
// //
//go:nosplit //go:nosplit
func setSignalstackSP(s *stackt, sp uintptr) { func setSignalstackSP(s *stackt, sp uintptr) {

View file

@ -297,7 +297,7 @@ func getsig(i uint32) uintptr {
return sa.sa_handler return sa.sa_handler
} }
// setSignaltstackSP sets the ss_sp field of a stackt. // setSignalstackSP sets the ss_sp field of a stackt.
// //
//go:nosplit //go:nosplit
func setSignalstackSP(s *stackt, sp uintptr) { func setSignalstackSP(s *stackt, sp uintptr) {

View file

@ -412,7 +412,7 @@ func getsig(i uint32) uintptr {
return *(*uintptr)(unsafe.Pointer(&sa.__sigaction_u)) return *(*uintptr)(unsafe.Pointer(&sa.__sigaction_u))
} }
// setSignaltstackSP sets the ss_sp field of a stackt. // setSignalstackSP sets the ss_sp field of a stackt.
// //
//go:nosplit //go:nosplit
func setSignalstackSP(s *stackt, sp uintptr) { func setSignalstackSP(s *stackt, sp uintptr) {

View file

@ -248,7 +248,7 @@ func getsig(i uint32) uintptr {
return sa.sa_sigaction return sa.sa_sigaction
} }
// setSignaltstackSP sets the ss_sp field of a stackt. // setSignalstackSP sets the ss_sp field of a stackt.
// //
//go:nosplit //go:nosplit
func setSignalstackSP(s *stackt, sp uintptr) { func setSignalstackSP(s *stackt, sp uintptr) {

View file

@ -362,7 +362,7 @@ func getsig(i uint32) uintptr {
return sa.sa_handler return sa.sa_handler
} }
// setSignaltstackSP sets the ss_sp field of a stackt. // setSignalstackSP sets the ss_sp field of a stackt.
// //
//go:nosplit //go:nosplit
func setSignalstackSP(s *stackt, sp uintptr) { func setSignalstackSP(s *stackt, sp uintptr) {

View file

@ -504,7 +504,7 @@ func getsig(i uint32) uintptr {
return sa.sa_handler return sa.sa_handler
} }
// setSignaltstackSP sets the ss_sp field of a stackt. // setSignalstackSP sets the ss_sp field of a stackt.
// //
//go:nosplit //go:nosplit
func setSignalstackSP(s *stackt, sp uintptr) { func setSignalstackSP(s *stackt, sp uintptr) {

View file

@ -352,7 +352,7 @@ func getsig(i uint32) uintptr {
return sa.sa_sigaction return sa.sa_sigaction
} }
// setSignaltstackSP sets the ss_sp field of a stackt. // setSignalstackSP sets the ss_sp field of a stackt.
// //
//go:nosplit //go:nosplit
func setSignalstackSP(s *stackt, sp uintptr) { func setSignalstackSP(s *stackt, sp uintptr) {

View file

@ -229,7 +229,7 @@ func getsig(i uint32) uintptr {
return sa.sa_sigaction return sa.sa_sigaction
} }
// setSignaltstackSP sets the ss_sp field of a stackt. // setSignalstackSP sets the ss_sp field of a stackt.
// //
//go:nosplit //go:nosplit
func setSignalstackSP(s *stackt, sp uintptr) { func setSignalstackSP(s *stackt, sp uintptr) {