github.com/x04/go/src@v0.0.0-20200202162449-3d481ceb3525/runtime/os_linux_mips64x.go (about)

     1  // Copyright 2015 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  // +build linux
     6  // +build mips64 mips64le
     7  
     8  package runtime
     9  
    10  func archauxv(tag, val uintptr) {
    11  }
    12  
    13  func osArchInit()	{}
    14  
    15  //go:nosplit
    16  func cputicks() int64 {
    17  	// Currently cputicks() is used in blocking profiler and to seed fastrand().
    18  	// nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
    19  	return nanotime()
    20  }
    21  
    22  const (
    23  	_SS_DISABLE	= 2
    24  	_NSIG		= 129
    25  	_SI_USER	= 0
    26  	_SIG_BLOCK	= 1
    27  	_SIG_UNBLOCK	= 2
    28  	_SIG_SETMASK	= 3
    29  )
    30  
    31  type sigset [2]uint64
    32  
    33  var sigset_all = sigset{^uint64(0), ^uint64(0)}
    34  
    35  //go:nosplit
    36  //go:nowritebarrierrec
    37  func sigaddset(mask *sigset, i int) {
    38  	(*mask)[(i-1)/64] |= 1 << ((uint32(i) - 1) & 63)
    39  }
    40  
    41  func sigdelset(mask *sigset, i int) {
    42  	(*mask)[(i-1)/64] &^= 1 << ((uint32(i) - 1) & 63)
    43  }
    44  
    45  func sigfillset(mask *[2]uint64) {
    46  	(*mask)[0], (*mask)[1] = ^uint64(0), ^uint64(0)
    47  }