Debian Codegraph @

src/runtime/os_linux_mipsx.go

raw
1 // Copyright 2016 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 //go:build linux && (mips || mipsle)
6
7 package runtime
8
9 func archauxv(tag, val uintptr) {
10 }
11
12 //go:nosplit
13 func cputicks() int64 {
14 // nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
15 return nanotime()
16 }
17
18 const (
19 _SS_DISABLE = 2
20 _NSIG = 128 + 1
21 _SIG_BLOCK = 1
22 _SIG_UNBLOCK = 2
23 _SIG_SETMASK = 3
24 )
25
26 type sigset [4]uint32
27
28 var sigset_all = sigset{^uint32(0), ^uint32(0), ^uint32(0), ^uint32(0)}
29
30 //go:nosplit
31 //go:nowritebarrierrec
32 func sigaddset(mask *sigset, i int) {
33 (*mask)[(i-1)/32] |= 1 << ((uint32(i) - 1) & 31)
34 }
35
36 func sigdelset(mask *sigset, i int) {
37 (*mask)[(i-1)/32] &^= 1 << ((uint32(i) - 1) & 31)
38 }
39
40 //go:nosplit
41 func sigfillset(mask *[4]uint32) {
42 (*mask)[0], (*mask)[1], (*mask)[2], (*mask)[3] = ^uint32(0), ^uint32(0), ^uint32(0), ^uint32(0)
43 }