mirror of https://go.googlesource.com/go
24fa7544b0
Ticker.Reset was added in CL 217362 in 2020. It added the runtime helper modTimer, which is analogous to startTimer and resetTimer but for tickers. Unlike those, it does not contain a racerelease, which means that code synchronizing by starting a ticker will be diagnosed with a spurious race. Add racerelease to modTimer and add tests of all three racereleases (in startTimer, resetTimer, and modTimer). Also do not call time.resetTimer from elsewhere in runtime, since that function is only for package time. Use t.reset instead. For #33184. Change-Id: Ie40c1ad24911f21e81b1d3cc608cf086ff2bc83d Reviewed-on: https://go-review.googlesource.com/c/go/+/568340 Auto-Submit: Russ Cox <rsc@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com> |
||
---|---|---|
.. | ||
internal | ||
testdata | ||
README | ||
doc.go | ||
mkcgo.sh | ||
output_test.go | ||
race.go | ||
race_darwin_amd64.go | ||
race_darwin_arm64.go | ||
race_darwin_arm64.syso | ||
race_linux_arm64.syso | ||
race_linux_ppc64le.syso | ||
race_linux_s390x.syso | ||
race_linux_test.go | ||
race_test.go | ||
race_unix_test.go | ||
race_v1_amd64.go | ||
race_v3_amd64.go | ||
race_windows_test.go | ||
sched_test.go | ||
syso_test.go | ||
timer_test.go |
README
runtime/race package contains the data race detector runtime library. It is based on ThreadSanitizer race detector, that is currently a part of the LLVM project (https://github.com/llvm/llvm-project/tree/main/compiler-rt). To update the .syso files use golang.org/x/build/cmd/racebuild. internal/amd64v1/race_darwin.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. internal/amd64v1/race_freebsd.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. internal/amd64v1/race_linux.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. internal/amd64v1/race_netbsd.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. internal/amd64v1/race_openbsd.syso built with LLVM fcf6ae2f070eba73074b6ec8d8281e54d29dbeeb and Go 8f2db14cd35bbd674cb2988a508306de6655e425. internal/amd64v1/race_windows.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. internal/amd64v3/race_linux.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. race_darwin_arm64.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. race_linux_arm64.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. race_linux_ppc64le.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. race_linux_s390x.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5.