]> Cypherpunks.ru repositories - gostls13.git/commitdiff
runtime: fix a few function names on comments
authorcui fliter <imcusg@gmail.com>
Mon, 3 Oct 2022 01:32:11 +0000 (01:32 +0000)
committerMeng Zhuo <mzh@golangcn.org>
Wed, 26 Oct 2022 02:39:39 +0000 (02:39 +0000)
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>

13 files changed:
src/runtime/env_plan9.go
src/runtime/float.go
src/runtime/mbarrier.go
src/runtime/mbitmap.go
src/runtime/mpagealloc.go
src/runtime/os3_solaris.go
src/runtime/os_aix.go
src/runtime/os_darwin.go
src/runtime/os_dragonfly.go
src/runtime/os_freebsd.go
src/runtime/os_linux.go
src/runtime/os_netbsd.go
src/runtime/os_openbsd.go

index 65480c82177072fce1917d82a84d82e49ba7c79b..d206c5dbba4b1fcf1e3745f78cd9f215aac17993 100644 (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
index c80c8b7abfb0c80e7d526271db10935c5643ed4c..9f281c404505aef53ea063f6cc5a5a1bc37fcc3c 100644 (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))
index efe6c4f2d6346195ee155453042387e218a09836..46ef42f74dd5d34606b369bdc6dfea808d887652 100644 (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.
 //
index 7cc22309f1bb1a1e585a6a82ef260816aa782c0a..dc99ba768bb4c160a58640e559f66f7610e27536 100644 (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
index a8bfc62a807c56fe7768b1faa6e993fec6395b7c..35b2a019a3ba2d9d513e03b4e2df5e63ae6e4c8d 100644 (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
 }
index dcdfe666aca7e9d1524e05b8910cf519ceda5c62..3bc23e17befcf97e06ec6d26a0a4932f47fe73a2 100644 (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) {
index 104c397e8c050bd07dc1cf784cdacab8d83a4b64..2b19ed6d96a00a05d8c918a90d565c43bf653233 100644 (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) {
index 8562d7d9069ee21beaf495defa98d1f97cc06112..52f44c90e9309e248467f0ec381f88a610593901 100644 (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) {
index 83478143b933b14e57ea1ed3a88d546038c44325..979a7d1642ed7cfcb559b39489d6d5fb40092f76 100644 (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) {
index 23efd1a46e83493ff658db41bad949547920c760..278a2fd20a2cc1894697634c7749cf7e4e7cd04b 100644 (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) {
index 53629ec90b8019caeb4819116568741469741bb5..d6be99f4c36b0b72462e78ce0a06b2b41d399554 100644 (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) {
index bb23adff0763e1ced65fdddb9aa4989b497021b3..0273d33c0598971aca591b20c0898bbd7cadb3a7 100644 (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) {
index 7af6c4afe746c1ed59ceddc8452f26357516cfb9..500286ab985038801bf963dd78b5d456855d2abf 100644 (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) {