github.com/ice-blockchain/go/src@v0.0.0-20240403114104-1564d284e521/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 _SIG_BLOCK = 0 15 _SIG_UNBLOCK = 1 16 _SIG_SETMASK = 2 17 ) 18 19 type sigset uint64 20 21 var sigset_all = sigset(^uint64(0)) 22 23 //go:nosplit 24 //go:nowritebarrierrec 25 func sigaddset(mask *sigset, i int) { 26 if i > 64 { 27 throw("unexpected signal greater than 64") 28 } 29 *mask |= 1 << (uint(i) - 1) 30 } 31 32 func sigdelset(mask *sigset, i int) { 33 if i > 64 { 34 throw("unexpected signal greater than 64") 35 } 36 *mask &^= 1 << (uint(i) - 1) 37 } 38 39 //go:nosplit 40 func sigfillset(mask *uint64) { 41 *mask = ^uint64(0) 42 }