github.com/rafaeltorres324/go/src@v0.0.0-20210519164414-9fdf653a9838/runtime/os_linux_mipsx.go (about) 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 // +build linux 6 // +build mips mipsle 7 8 package runtime 9 10 func archauxv(tag, val uintptr) { 11 } 12 13 func osArchInit() {} 14 15 //go:nosplit 16 func cputicks() int64 { 17 // Currently cputicks() is used in blocking profiler and to seed fastrand(). 18 // nanotime() is a poor approximation of CPU ticks that is enough for the profiler. 19 return nanotime() 20 } 21 22 const ( 23 _SS_DISABLE = 2 24 _NSIG = 128 + 1 25 _SI_USER = 0 26 _SIG_BLOCK = 1 27 _SIG_UNBLOCK = 2 28 _SIG_SETMASK = 3 29 ) 30 31 type sigset [4]uint32 32 33 var sigset_all = sigset{^uint32(0), ^uint32(0), ^uint32(0), ^uint32(0)} 34 35 //go:nosplit 36 //go:nowritebarrierrec 37 func sigaddset(mask *sigset, i int) { 38 (*mask)[(i-1)/32] |= 1 << ((uint32(i) - 1) & 31) 39 } 40 41 func sigdelset(mask *sigset, i int) { 42 (*mask)[(i-1)/32] &^= 1 << ((uint32(i) - 1) & 31) 43 } 44 45 //go:nosplit 46 func sigfillset(mask *[4]uint32) { 47 (*mask)[0], (*mask)[1], (*mask)[2], (*mask)[3] = ^uint32(0), ^uint32(0), ^uint32(0), ^uint32(0) 48 }