github.com/Schaudge/grailbase@v0.0.0-20240223061707-44c758a471c0/intervalmap/randomized_freepool_internal.go (about)

     1  // Code generated by generate_randomized_freepool.py. DO NOT EDIT.
     2  package intervalmap
     3  
     4  // This import is needed to use go:linkname.
     5  import _ "unsafe"
     6  
     7  // The following functions are defined in go runtime.  To use them, we need to
     8  // import "unsafe", and elsewhere in this package, import "C" to force compiler
     9  // to recognize the "go:linktime" directive. Some of the details are explained
    10  // in the below blog post.
    11  //
    12  // procPin() pins the caller to the current processor, and returns the processor
    13  // id in range [0,GOMAXPROCS). procUnpin() undos the effect of procPin().
    14  //
    15  // http://www.alangpierce.com/blog/2016/03/17/adventures-in-go-accessing-unexported-functions/
    16  
    17  //go:linkname runtime_procPin sync.runtime_procPin
    18  //go:nosplit
    19  func runtime_procPin() int
    20  
    21  //go:linkname runtime_procUnpin sync.runtime_procUnpin
    22  //go:nosplit
    23  func runtime_procUnpin()
    24  
    25  //go:linkname fastrand runtime.fastrand
    26  func fastrand(n uint32) uint32