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