Black Lives Matter. Support the Equal Justice Initiative.

Source file src/runtime/os_linux_mipsx.go

Documentation: runtime

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

View as plain text