github.com/AESNooper/go/src@v0.0.0-20220218095104-b56a4ab1bbbb/runtime/os_linux_be64.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 // The standard Linux sigset type on big-endian 64-bit machines. 6 7 //go:build linux && (ppc64 || s390x) 8 9 package runtime 10 11 const ( 12 _SS_DISABLE = 2 13 _NSIG = 65 14 _SI_USER = 0 15 _SIG_BLOCK = 0 16 _SIG_UNBLOCK = 1 17 _SIG_SETMASK = 2 18 ) 19 20 type sigset uint64 21 22 var sigset_all = sigset(^uint64(0)) 23 24 //go:nosplit 25 //go:nowritebarrierrec 26 func sigaddset(mask *sigset, i int) { 27 if i > 64 { 28 throw("unexpected signal greater than 64") 29 } 30 *mask |= 1 << (uint(i) - 1) 31 } 32 33 func sigdelset(mask *sigset, i int) { 34 if i > 64 { 35 throw("unexpected signal greater than 64") 36 } 37 *mask &^= 1 << (uint(i) - 1) 38 } 39 40 //go:nosplit 41 func sigfillset(mask *uint64) { 42 *mask = ^uint64(0) 43 }