aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorcui fliter <imcusg@gmail.com>2022-11-11 19:22:35 +0800
committerGopher Robot <gobot@golang.org>2022-11-18 17:59:44 +0000
commitb2faff18ce28edad98303d2c3134dec1331fd7b5 (patch)
tree2161dfe37742a6be201f506abf0d4f20533e8d76 /src/runtime
parent893964b9727a3dfcadab75c0f6b3c6b683b9bae0 (diff)
downloadgo-b2faff18ce28edad98303d2c3134dec1331fd7b5.tar.xz
all: add missing periods in comments
Change-Id: I69065f8adf101fdb28682c55997f503013a50e29 Reviewed-on: https://go-review.googlesource.com/c/go/+/449757 Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Joedian Reid <joedian@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Joedian Reid <joedian@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/cgocall.go4
-rw-r--r--src/runtime/chan.go4
-rw-r--r--src/runtime/debug/mod.go2
-rw-r--r--src/runtime/heapdump.go10
-rw-r--r--src/runtime/lock_futex.go2
-rw-r--r--src/runtime/lock_sema.go2
-rw-r--r--src/runtime/malloc.go2
-rw-r--r--src/runtime/map.go2
-rw-r--r--src/runtime/mfinal.go2
-rw-r--r--src/runtime/mgcwork.go2
-rw-r--r--src/runtime/os_aix.go2
-rw-r--r--src/runtime/os_openbsd_syscall2.go2
-rw-r--r--src/runtime/pprof/pprof.go2
-rw-r--r--src/runtime/proc.go4
-rw-r--r--src/runtime/race.go2
-rw-r--r--src/runtime/runtime1.go2
-rw-r--r--src/runtime/stubs2.go2
-rw-r--r--src/runtime/stubs_ppc64.go2
18 files changed, 25 insertions, 25 deletions
diff --git a/src/runtime/cgocall.go b/src/runtime/cgocall.go
index 0a25cb6562..9c75280d62 100644
--- a/src/runtime/cgocall.go
+++ b/src/runtime/cgocall.go
@@ -346,12 +346,12 @@ func unwindm(restore *bool) {
}
}
-// called from assembly
+// called from assembly.
func badcgocallback() {
throw("misaligned stack in cgocallback")
}
-// called from (incomplete) assembly
+// called from (incomplete) assembly.
func cgounimpl() {
throw("cgo not implemented")
}
diff --git a/src/runtime/chan.go b/src/runtime/chan.go
index a9ef0781ce..6a0ad35b86 100644
--- a/src/runtime/chan.go
+++ b/src/runtime/chan.go
@@ -138,7 +138,7 @@ func full(c *hchan) bool {
return c.qcount == c.dataqsiz
}
-// entry point for c <- x from compiled code
+// entry point for c <- x from compiled code.
//
//go:nosplit
func chansend1(c *hchan, elem unsafe.Pointer) {
@@ -435,7 +435,7 @@ func empty(c *hchan) bool {
return atomic.Loaduint(&c.qcount) == 0
}
-// entry points for <- c from compiled code
+// entry points for <- c from compiled code.
//
//go:nosplit
func chanrecv1(c *hchan, elem unsafe.Pointer) {
diff --git a/src/runtime/debug/mod.go b/src/runtime/debug/mod.go
index 688e2581ed..3ef8cfb5de 100644
--- a/src/runtime/debug/mod.go
+++ b/src/runtime/debug/mod.go
@@ -11,7 +11,7 @@ import (
"strings"
)
-// exported from runtime
+// exported from runtime.
func modinfo() string
// ReadBuildInfo returns the build information embedded
diff --git a/src/runtime/heapdump.go b/src/runtime/heapdump.go
index 6fcc232313..f57a1a1e17 100644
--- a/src/runtime/heapdump.go
+++ b/src/runtime/heapdump.go
@@ -120,7 +120,7 @@ type typeCacheBucket struct {
var typecache [typeCacheBuckets]typeCacheBucket
-// dump a uint64 in a varint format parseable by encoding/binary
+// dump a uint64 in a varint format parseable by encoding/binary.
func dumpint(v uint64) {
var buf [10]byte
var n int
@@ -142,7 +142,7 @@ func dumpbool(b bool) {
}
}
-// dump varint uint64 length followed by memory contents
+// dump varint uint64 length followed by memory contents.
func dumpmemrange(data unsafe.Pointer, len uintptr) {
dumpint(uint64(len))
dwrite(data, len)
@@ -159,7 +159,7 @@ func dumpstr(s string) {
dumpmemrange(unsafe.Pointer(unsafe.StringData(s)), uintptr(len(s)))
}
-// dump information for a type
+// dump information for a type.
func dumptype(t *_type) {
if t == nil {
return
@@ -206,7 +206,7 @@ func dumptype(t *_type) {
dumpbool(t.kind&kindDirectIface == 0 || t.ptrdata != 0)
}
-// dump an object
+// dump an object.
func dumpobj(obj unsafe.Pointer, size uintptr, bv bitvector) {
dumpint(tagObject)
dumpint(uint64(uintptr(obj)))
@@ -239,7 +239,7 @@ type childInfo struct {
depth uintptr // depth in call stack (0 == most recent)
}
-// dump kinds & offsets of interesting fields in bv
+// dump kinds & offsets of interesting fields in bv.
func dumpbv(cbv *bitvector, offset uintptr) {
for i := uintptr(0); i < uintptr(cbv.n); i++ {
if cbv.ptrbit(i) == 1 {
diff --git a/src/runtime/lock_futex.go b/src/runtime/lock_futex.go
index 1578984ce2..cc7d465ef1 100644
--- a/src/runtime/lock_futex.go
+++ b/src/runtime/lock_futex.go
@@ -226,7 +226,7 @@ func notetsleep(n *note, ns int64) bool {
}
// same as runtimeĀ·notetsleep, but called on user g (not g0)
-// calls only nosplit functions between entersyscallblock/exitsyscall
+// calls only nosplit functions between entersyscallblock/exitsyscall.
func notetsleepg(n *note, ns int64) bool {
gp := getg()
if gp == gp.m.g0 {
diff --git a/src/runtime/lock_sema.go b/src/runtime/lock_sema.go
index c5e8cfe24a..e15bbf79ae 100644
--- a/src/runtime/lock_sema.go
+++ b/src/runtime/lock_sema.go
@@ -284,7 +284,7 @@ func notetsleep(n *note, ns int64) bool {
}
// same as runtimeĀ·notetsleep, but called on user g (not g0)
-// calls only nosplit functions between entersyscallblock/exitsyscall
+// calls only nosplit functions between entersyscallblock/exitsyscall.
func notetsleepg(n *note, ns int64) bool {
gp := getg()
if gp == gp.m.g0 {
diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go
index 3b9828fe54..7ff2190876 100644
--- a/src/runtime/malloc.go
+++ b/src/runtime/malloc.go
@@ -1249,7 +1249,7 @@ func memclrNoHeapPointersChunked(size uintptr, x unsafe.Pointer) {
// implementation of new builtin
// compiler (both frontend and SSA backend) knows the signature
-// of this function
+// of this function.
func newobject(typ *_type) unsafe.Pointer {
return mallocgc(typ.size, typ, true)
}
diff --git a/src/runtime/map.go b/src/runtime/map.go
index 65be4727fd..f546ce8609 100644
--- a/src/runtime/map.go
+++ b/src/runtime/map.go
@@ -514,7 +514,7 @@ bucketloop:
return unsafe.Pointer(&zeroVal[0]), false
}
-// returns both key and elem. Used by map iterator
+// returns both key and elem. Used by map iterator.
func mapaccessK(t *maptype, h *hmap, key unsafe.Pointer) (unsafe.Pointer, unsafe.Pointer) {
if h == nil || h.count == 0 {
return nil, nil
diff --git a/src/runtime/mfinal.go b/src/runtime/mfinal.go
index 257e9d1560..d4d4f1f302 100644
--- a/src/runtime/mfinal.go
+++ b/src/runtime/mfinal.go
@@ -172,7 +172,7 @@ func finalizercommit(gp *g, lock unsafe.Pointer) bool {
return true
}
-// This is the goroutine that runs all of the finalizers
+// This is the goroutine that runs all of the finalizers.
func runfinq() {
var (
frame unsafe.Pointer
diff --git a/src/runtime/mgcwork.go b/src/runtime/mgcwork.go
index 65ac0a6fc7..7ab89754d4 100644
--- a/src/runtime/mgcwork.go
+++ b/src/runtime/mgcwork.go
@@ -421,7 +421,7 @@ func putfull(b *workbuf) {
}
// trygetfull tries to get a full or partially empty workbuffer.
-// If one is not immediately available return nil
+// If one is not immediately available return nil.
//
//go:nowritebarrier
func trygetfull() *workbuf {
diff --git a/src/runtime/os_aix.go b/src/runtime/os_aix.go
index 7c5947d06f..e07c7f1da6 100644
--- a/src/runtime/os_aix.go
+++ b/src/runtime/os_aix.go
@@ -163,7 +163,7 @@ func mpreinit(mp *m) {
}
// errno address must be retrieved by calling _Errno libc function.
-// This will return a pointer to errno
+// This will return a pointer to errno.
func miniterrno() {
mp := getg().m
r, _ := syscall0(&libc__Errno)
diff --git a/src/runtime/os_openbsd_syscall2.go b/src/runtime/os_openbsd_syscall2.go
index 2fed794d7a..ebf478badf 100644
--- a/src/runtime/os_openbsd_syscall2.go
+++ b/src/runtime/os_openbsd_syscall2.go
@@ -47,7 +47,7 @@ func write1(fd uintptr, p unsafe.Pointer, n int32) int32
//go:noescape
func open(name *byte, mode, perm int32) int32
-// return value is only set on linux to be used in osinit()
+// return value is only set on linux to be used in osinit().
func madvise(addr unsafe.Pointer, n uintptr, flags int32) int32
// exitThread terminates the current thread, writing *wait = freeMStack when
diff --git a/src/runtime/pprof/pprof.go b/src/runtime/pprof/pprof.go
index 725fd26c13..17a490efed 100644
--- a/src/runtime/pprof/pprof.go
+++ b/src/runtime/pprof/pprof.go
@@ -861,7 +861,7 @@ func writeMutex(w io.Writer, debug int) error {
return writeProfileInternal(w, debug, "mutex", runtime.MutexProfile)
}
-// writeProfileInternal writes the current blocking or mutex profile depending on the passed parameters
+// writeProfileInternal writes the current blocking or mutex profile depending on the passed parameters.
func writeProfileInternal(w io.Writer, debug int, name string, runtimeProfile func([]runtime.BlockProfileRecord) (int, bool)) error {
var p []runtime.BlockProfileRecord
n, ok := runtimeProfile(nil)
diff --git a/src/runtime/proc.go b/src/runtime/proc.go
index 176399c7eb..56565479e0 100644
--- a/src/runtime/proc.go
+++ b/src/runtime/proc.go
@@ -481,7 +481,7 @@ func releaseSudog(s *sudog) {
releasem(mp)
}
-// called from assembly
+// called from assembly.
func badmcall(fn func(*g)) {
throw("runtime: mcall called on m->g0 stack")
}
@@ -3534,7 +3534,7 @@ func gosched_m(gp *g) {
goschedImpl(gp)
}
-// goschedguarded is a forbidden-states-avoided version of gosched_m
+// goschedguarded is a forbidden-states-avoided version of gosched_m.
func goschedguarded_m(gp *g) {
if !canPreemptM(gp.m) {
diff --git a/src/runtime/race.go b/src/runtime/race.go
index 40b6e00398..f83a04db4a 100644
--- a/src/runtime/race.go
+++ b/src/runtime/race.go
@@ -350,7 +350,7 @@ func racecallbackthunk(uintptr)
// with up to 4 uintptr arguments.
func racecall(fn *byte, arg0, arg1, arg2, arg3 uintptr)
-// checks if the address has shadow (i.e. heap or data/bss)
+// checks if the address has shadow (i.e. heap or data/bss).
//
//go:nosplit
func isvalidaddr(addr unsafe.Pointer) bool {
diff --git a/src/runtime/runtime1.go b/src/runtime/runtime1.go
index 76dca9ca77..277f18a5a6 100644
--- a/src/runtime/runtime1.go
+++ b/src/runtime/runtime1.go
@@ -56,7 +56,7 @@ var (
argv **byte
)
-// nosplit for use in linux startup sysargs
+// nosplit for use in linux startup sysargs.
//
//go:nosplit
func argv_index(argv **byte, i int32) *byte {
diff --git a/src/runtime/stubs2.go b/src/runtime/stubs2.go
index c245c9c1a1..0d83deb2af 100644
--- a/src/runtime/stubs2.go
+++ b/src/runtime/stubs2.go
@@ -34,7 +34,7 @@ func write1(fd uintptr, p unsafe.Pointer, n int32) int32
//go:noescape
func open(name *byte, mode, perm int32) int32
-// return value is only set on linux to be used in osinit()
+// return value is only set on linux to be used in osinit().
func madvise(addr unsafe.Pointer, n uintptr, flags int32) int32
// exitThread terminates the current thread, writing *wait = freeMStack when
diff --git a/src/runtime/stubs_ppc64.go b/src/runtime/stubs_ppc64.go
index 6919b748f0..e23e33871b 100644
--- a/src/runtime/stubs_ppc64.go
+++ b/src/runtime/stubs_ppc64.go
@@ -6,7 +6,7 @@
package runtime
-// This is needed for vet
+// This is needed for vet.
//
//go:noescape
func callCgoSigaction(sig uintptr, new, old *sigactiont) int32