diff options
author | Joel Sing <joel@sing.id.au> | 2019-04-27 03:02:25 +1000 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2019-04-26 17:34:45 +0000 |
commit | 3d94dd78d464e4e802fdc9db345daea35f230ba2 (patch) | |
tree | 9412cc93ac5c4408efcc3f6b6e83844494cac6e9 /src/runtime/os_openbsd_arm64.go | |
parent | 80704ec3fa79e6efb50124e8063b31a4c032a1ff (diff) | |
download | go-3d94dd78d464e4e802fdc9db345daea35f230ba2.tar.gz go-3d94dd78d464e4e802fdc9db345daea35f230ba2.zip |
runtime: add support for openbsd/arm64
Updates #31656
Change-Id: I0b7486f7381fd8bd16a76278c0e9ec9763671fcc
Reviewed-on: https://go-review.googlesource.com/c/go/+/174119
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/os_openbsd_arm64.go')
-rw-r--r-- | src/runtime/os_openbsd_arm64.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/runtime/os_openbsd_arm64.go b/src/runtime/os_openbsd_arm64.go new file mode 100644 index 0000000000..5130ce66c5 --- /dev/null +++ b/src/runtime/os_openbsd_arm64.go @@ -0,0 +1,13 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package runtime + +//go:nosplit +func cputicks() int64 { + // Currently cputicks() is used in blocking profiler and to seed runtime·fastrand(). + // runtime·nanotime() is a poor approximation of CPU ticks that is enough for the profiler. + // TODO: need more entropy to better seed fastrand. + return nanotime() +} |