aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2025-03-11 11:23:24 -0400
committerRuss Cox <rsc@golang.org>2025-03-31 17:06:53 -0700
commit4c32b1cc753e9005ed7c741bf69d3cb69ee3a56c (patch)
treef17291ce003aa2c72c130120abb76b394c399a11 /src/cmd/internal/obj
parent6d418096b2dfe2a2e47b7aa83b46748fb301e6cb (diff)
downloadgo-4c32b1cc753e9005ed7c741bf69d3cb69ee3a56c.tar.xz
runtime: fix plan9 monotonic time, crypto randomness
Open /dev/bintime at process start on Plan 9, marked close-on-exec, hold it open for the duration of the process, and use it for obtaining time. The change to using /dev/bintime also sets up for an upcoming Plan 9 change to add monotonic time to that file. If the monotonic field is available, then nanotime1 and time.now use that field. Otherwise they fall back to using Unix nanoseconds as "monotonic", as they always have. Before this CL, monotonic time went backward any time aux/timesync decided to adjust the system's time-of-day backward. Also use /dev/random for randomness (once at startup). Before this CL, there was no real randomness in the runtime on Plan 9 (the crypto/rand package still had some). Now there will be. Change-Id: I0c20ae79d3d96eff1a5f839a56cec5c4bc517e61 Reviewed-on: https://go-review.googlesource.com/c/go/+/656755 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Bypass: Russ Cox <rsc@golang.org> Reviewed-by: Carlos Amedee <carlos@golang.org>
Diffstat (limited to 'src/cmd/internal/obj')
0 files changed, 0 insertions, 0 deletions