Debian Codegraph @

libgo/go/syscall/syscall_linux.go

raw
1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 package syscall
6
7 // AllThreadsSyscall performs a syscall on each OS thread of the Go
8 // runtime. It first invokes the syscall on one thread. Should that
9 // invocation fail, it returns immediately with the error status.
10 // Otherwise, it invokes the syscall on all of the remaining threads
11 // in parallel. It will terminate the program if it observes any
12 // invoked syscall's return value differs from that of the first
13 // invocation.
14 //
15 // AllThreadsSyscall is intended for emulating simultaneous
16 // process-wide state changes that require consistently modifying
17 // per-thread state of the Go runtime.
18 //
19 // AllThreadsSyscall is unaware of any threads that are launched
20 // explicitly by cgo linked code, so the function always returns
21 // ENOTSUP in binaries that use cgo.
22 //
23 //go:uintptrescapes
24 func AllThreadsSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) {
25 return minus1, minus1, ENOTSUP
26 }
27
28 // AllThreadsSyscall6 is like AllThreadsSyscall, but extended to six
29 // arguments.
30 //
31 //go:uintptrescapes
32 func AllThreadsSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) {
33 return minus1, minus1, ENOTSUP
34 }
35
36 const minus1 = ^uintptr(0)