]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: gofmt -w -s
authorJes Cok <xigua67damn@gmail.com>
Thu, 16 Nov 2023 07:06:03 +0000 (07:06 +0000)
committerMichael Knyszek <mknyszek@google.com>
Fri, 17 Nov 2023 15:33:38 +0000 (15:33 +0000)
Change-Id: I2eac85b502df9851df294f8d46c7845f635dde9b
GitHub-Last-Rev: 3c8382442a0fadb355be9e4656942c2e03db2391
GitHub-Pull-Request: golang/go#64198
Reviewed-on: https://go-review.googlesource.com/c/go/+/542697
Run-TryBot: Jes Cok <xigua67damn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/export_debug_ppc64le_test.go
src/runtime/mgc.go
src/runtime/testdata/testprogcgo/stackswitch.go
src/runtime/testdata/testprognet/waiters.go
src/runtime/testdata/testwinlibthrow/main.go

index b20cf6c47e2e0d8fe4d46278f101e9107cd96969..dd5dce56495945851df8234c5791127019119e7e 100644 (file)
@@ -116,7 +116,7 @@ func storeRegArgs(dst *sigcontext, src *abi.RegArgs) {
 
 func loadRegArgs(dst *abi.RegArgs, src *sigcontext) {
        // Gprs R3..R10, R14..R17 are used to pass int arguments in registers on PPC64
-       for i, _ := range [12]int{} {
+       for i := range [12]int{} {
                if i > 7 {
                        dst.Ints[i] = uintptr(src.gp_regs[i+6])
                } else {
@@ -124,7 +124,7 @@ func loadRegArgs(dst *abi.RegArgs, src *sigcontext) {
                }
        }
        // Fprs F1..F13 are used to pass float arguments in registers on PPC64
-       for i, _ := range [12]int{} {
+       for i := range [12]int{} {
                dst.Floats[i] = math.Float64bits(src.fp_regs[i+1])
        }
 
index 5d3969764939b3a23594383074491f678e4c60ce..6c51517522a1740453b0ac50037ad82c69bf5966 100644 (file)
@@ -418,7 +418,7 @@ type workType struct {
        stwprocs, maxprocs                 int32
        tSweepTerm, tMark, tMarkTerm, tEnd int64 // nanotime() of phase start
 
-       pauseNS    int64 // total STW time this cycle
+       pauseNS int64 // total STW time this cycle
 
        // debug.gctrace heap sizes for this cycle.
        heap0, heap1, heap2 uint64
index a2e422f0777fdfd339d598044a929248a9c447ec..70e630e595e22d0029840cb79b9fb93338d7d6bd 100644 (file)
@@ -29,7 +29,6 @@ func stackSwitchCallback() {
        debug.SetGCPercent(gogc)
 }
 
-
 // Regression test for https://go.dev/issue/62440. It should be possible for C
 // threads to call into Go from different stacks without crashing due to g0
 // stack bounds checks.
@@ -37,7 +36,7 @@ func stackSwitchCallback() {
 // N.B. This is only OK for threads created in C. Threads with Go frames up the
 // stack must not change the stack out from under us.
 func StackSwitchCallback() {
-       C.callStackSwitchCallbackFromThread();
+       C.callStackSwitchCallbackFromThread()
 
        fmt.Printf("OK\n")
 }
index 6c8db1f14efb84d3c2c49cb1ff0e59e55b004033..a65c40bfbecc43ffca10f2ce634e6834d78a4510 100644 (file)
@@ -18,6 +18,7 @@ import (
 // The bug is that netpollWaiters increases monotonically.
 // This doesn't cause a problem until it overflows.
 // Use linkname to see the value.
+//
 //go:linkname netpollWaiters runtime.netpollWaiters
 var netpollWaiters atomic.Uint32
 
index ce0c92f252ffefa49e58a0ca9008773bfcada341..493e1e11d5618ace9ab532eace642fb4fa93ac78 100644 (file)
@@ -1,19 +1,19 @@
-package main\r
-\r
-import (\r
-       "os"\r
-       "syscall"\r
-)\r
-\r
-func main() {\r
-       dll := syscall.MustLoadDLL("veh.dll")\r
-       RaiseNoExcept := dll.MustFindProc("RaiseNoExcept")\r
-       ThreadRaiseNoExcept := dll.MustFindProc("ThreadRaiseNoExcept")\r
-\r
-       thread := len(os.Args) > 1 && os.Args[1] == "thread"\r
-       if !thread {\r
-               RaiseNoExcept.Call()\r
-       } else {\r
-               ThreadRaiseNoExcept.Call()\r
-       }\r
-}\r
+package main
+
+import (
+       "os"
+       "syscall"
+)
+
+func main() {
+       dll := syscall.MustLoadDLL("veh.dll")
+       RaiseNoExcept := dll.MustFindProc("RaiseNoExcept")
+       ThreadRaiseNoExcept := dll.MustFindProc("ThreadRaiseNoExcept")
+
+       thread := len(os.Args) > 1 && os.Args[1] == "thread"
+       if !thread {
+               RaiseNoExcept.Call()
+       } else {
+               ThreadRaiseNoExcept.Call()
+       }
+}