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