github.com/lzhfromustc/gofuzz@v0.0.0-20211116160056-151b3108bbd1/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  import "internal/cpu"
    11  
    12  func archauxv(tag, val uintptr) {
    13  	switch tag {
    14  	case _AT_HWCAP:
    15  		cpu.HWCap = uint(val)
    16  	}
    17  }
    18  
    19  func osArchInit() {}
    20  
    21  //go:nosplit
    22  func cputicks() int64 {
    23  	// Currently cputicks() is used in blocking profiler and to seed fastrand().
    24  	// nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
    25  	return nanotime()
    26  }
    27  
    28  const (
    29  	_SS_DISABLE  = 2
    30  	_NSIG        = 129
    31  	_SI_USER     = 0
    32  	_SIG_BLOCK   = 1
    33  	_SIG_UNBLOCK = 2
    34  	_SIG_SETMASK = 3
    35  )
    36  
    37  type sigset [2]uint64
    38  
    39  var sigset_all = sigset{^uint64(0), ^uint64(0)}
    40  
    41  //go:nosplit
    42  //go:nowritebarrierrec
    43  func sigaddset(mask *sigset, i int) {
    44  	(*mask)[(i-1)/64] |= 1 << ((uint32(i) - 1) & 63)
    45  }
    46  
    47  func sigdelset(mask *sigset, i int) {
    48  	(*mask)[(i-1)/64] &^= 1 << ((uint32(i) - 1) & 63)
    49  }
    50  
    51  //go:nosplit
    52  func sigfillset(mask *[2]uint64) {
    53  	(*mask)[0], (*mask)[1] = ^uint64(0), ^uint64(0)
    54  }