runtime: fix a few function names on comments

Change-Id: I4be0b1e612dcc21ca6bb7d4395f1c0aa52480759
GitHub-Last-Rev: 032480c4c9ddb2bedea26b01bb80b8a079bfdcf3
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
)
// 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.
// Subsequent calls to os.Setenv will change this cache, without writing back
// 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.
//
//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.
// 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
}
// 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.
//
//go:nosplit

View File

@ -24,12 +24,12 @@ func isInf(f float64) bool {
return !isNaN(f) && !isFinite(f)
}
// Abs returns the absolute value of x.
// abs returns the absolute value of x.
//
// Special cases are:
//
// Abs(±Inf) = +Inf
// Abs(NaN) = NaN
// abs(±Inf) = +Inf
// abs(NaN) = NaN
func abs(x float64) float64 {
const sign = 1 << 63
return float64frombits(float64bits(x) &^ sign)
@ -42,12 +42,12 @@ func copysign(x, y float64) float64 {
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 {
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.
func float64frombits(b uint64) float64 {
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)
}
// 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.
// 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
}
// 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
func reflect_verifyNotInHeapPtr(p uintptr) bool {
@ -1409,7 +1409,7 @@ func getgcmaskcb(frame *stkframe, ctxt unsafe.Pointer) bool {
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.
//
//go:linkname reflect_gcbits reflect.gcbits

View File

@ -106,7 +106,7 @@ func chunkIndex(p uintptr) chunkIdx {
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 {
return uintptr(ci)*pallocChunkBytes + arenaBaseOffset
}

View File

@ -268,7 +268,7 @@ func getsig(i uint32) uintptr {
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
func setSignalstackSP(s *stackt, sp uintptr) {

View File

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

View File

@ -412,7 +412,7 @@ func getsig(i uint32) uintptr {
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
func setSignalstackSP(s *stackt, sp uintptr) {

View File

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

View File

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

View File

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

View File

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

View File

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