github.com/mh-cbon/go@v0.0.0-20160603070303-9e112a3fe4c0/src/runtime/os_linux_s390x.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 package runtime 6 7 const ( 8 _SS_DISABLE = 2 9 _NSIG = 65 10 _SI_USER = 0 11 _SIG_BLOCK = 0 12 _SIG_UNBLOCK = 1 13 _SIG_SETMASK = 2 14 _RLIMIT_AS = 9 15 ) 16 17 type sigset uint64 18 19 type rlimit struct { 20 rlim_cur uintptr 21 rlim_max uintptr 22 } 23 24 var sigset_all = sigset(^uint64(0)) 25 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 func sigfillset(mask *uint64) { 41 *mask = ^uint64(0) 42 } 43 44 func sigcopyset(mask *sigset, m sigmask) { 45 *mask = sigset(uint64(m[0]) | uint64(m[1])<<32) 46 }