diff options
author | Joel Sing <joel@sing.id.au> | 2019-11-04 04:58:37 +1100 |
---|---|---|
committer | Joel Sing <joel@sing.id.au> | 2020-01-19 14:04:09 +0000 |
commit | 8e0be05ec7c369387c0ed3c9cf37968c6d3afbbd (patch) | |
tree | a52a3963edf41ea1960b0c018d047ecfe0756460 /src/runtime/os_linux.go | |
parent | cbaa666682386fe5350bf87d7d70171704c90fe4 (diff) | |
download | go-8e0be05ec7c369387c0ed3c9cf37968c6d3afbbd.tar.gz go-8e0be05ec7c369387c0ed3c9cf37968c6d3afbbd.zip |
runtime: add support for linux/riscv64
Based on riscv-go port.
Updates #27532
Change-Id: If522807a382130be3c8d40f4b4c1131d1de7c9e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/204632
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/os_linux.go')
-rw-r--r-- | src/runtime/os_linux.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/runtime/os_linux.go b/src/runtime/os_linux.go index 8083126bcd..e0e3f4e341 100644 --- a/src/runtime/os_linux.go +++ b/src/runtime/os_linux.go @@ -116,6 +116,13 @@ const ( _CLONE_NEWUTS = 0x4000000 _CLONE_NEWIPC = 0x8000000 + // As of QEMU 2.8.0 (5ea2fc84d), user emulation requires all six of these + // flags to be set when creating a thread; attempts to share the other + // five but leave SYSVSEM unshared will fail with -EINVAL. + // + // In non-QEMU environments CLONE_SYSVSEM is inconsequential as we do not + // use System V semaphores. + cloneFlags = _CLONE_VM | /* share memory */ _CLONE_FS | /* share cwd, etc */ _CLONE_FILES | /* share fd table */ |