diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2019-10-04 10:07:36 +0200 |
---|---|---|
committer | Tobias Klauser <tobias.klauser@gmail.com> | 2019-10-25 17:59:05 +0000 |
commit | 6b6e67f9b9ad00ff03b8a46c054b8da4954bfab4 (patch) | |
tree | 54723aac27c84b490e10bbebcbad20cf858a3077 /src/runtime/vdso_freebsd_arm64.go | |
parent | fc8eb264bba88b9e4eb85fa7560817abb25767f4 (diff) | |
download | go-6b6e67f9b9ad00ff03b8a46c054b8da4954bfab4.tar.gz go-6b6e67f9b9ad00ff03b8a46c054b8da4954bfab4.zip |
runtime: add support for freebsd/arm64
Based on work by Mikaƫl Urankar (@MikaelUrankar),
Shigeru YAMAMOTO (@bsd-hacker) and @myfreeweb.
Updates #24715
Change-Id: If3189a693ca0aa627029e22b0f91534bcf322bc0
Reviewed-on: https://go-review.googlesource.com/c/go/+/198544
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/vdso_freebsd_arm64.go')
-rw-r--r-- | src/runtime/vdso_freebsd_arm64.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/runtime/vdso_freebsd_arm64.go b/src/runtime/vdso_freebsd_arm64.go new file mode 100644 index 0000000000..7d9f62d5f9 --- /dev/null +++ b/src/runtime/vdso_freebsd_arm64.go @@ -0,0 +1,21 @@ +// 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 + +const ( + _VDSO_TH_ALGO_ARM_GENTIM = 1 +) + +func getCntxct(physical bool) uint32 + +//go:nosplit +func (th *vdsoTimehands) getTimecounter() (uint32, bool) { + switch th.algo { + case _VDSO_TH_ALGO_ARM_GENTIM: + return getCntxct(false), true + default: + return 0, false + } +} |