...

Source file src/pkg/runtime/os_linux_be64.go

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

View as plain text