github.com/gitbookio/syncgroup@v0.0.0-20181003125046-3e73b2e6a972/mutex/runtime.go (about)

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