github.com/GitbookIO/syncgroup@v0.0.0-20200915204659-4f0b2961ab10/mutex/runtime.go (about)

     1  package mutex
     2  
     3  import (
     4  	"unsafe"
     5  )
     6  
     7  //go:linkname race_Enabled internal.race.Enabled
     8  var race_Enabled bool
     9  
    10  //go:noescape
    11  //go:linkname race_Enable internal.race.Enable
    12  func race_Enable()
    13  
    14  //go:noescape
    15  //go:linkname race_Disable internal.race.Disable
    16  func race_Disable()
    17  
    18  //go:noescape
    19  //go:linkname race_Acquire internal.race.Acquire
    20  func race_Acquire(unsafe.Pointer)
    21  
    22  //go:noescape
    23  //go:linkname race_Release internal.race.Release
    24  func race_Release(unsafe.Pointer)
    25  
    26  //go:noescape
    27  //go:linkname race_ReleaseMerge internal.race.ReleaseMerge
    28  func race_ReleaseMerge(unsafe.Pointer)
    29  
    30  //go:noescape
    31  //go:linkname runtime_canSpin runtime.runtime_canSpin
    32  func runtime_canSpin(i int) bool
    33  
    34  //go:noescape
    35  //go:linkname runtime_doSpin runtime.runtime_doSpin
    36  func runtime_doSpin()
    37  
    38  //go:noescape
    39  //go:linkname runtime_Semacquire runtime.runtime_Semacquire
    40  func runtime_Semacquire(s *uint32)
    41  
    42  //go:noescape
    43  //go:linkname runtime_Semrelease runtime.runtime_Semrelease
    44  func runtime_Semrelease(s *uint32)