github.com/timandy/routine@v1.1.4/runtime.go (about)

     1  package routine
     2  
     3  import (
     4  	"reflect"
     5  	"unsafe"
     6  
     7  	_ "github.com/timandy/routine/g"
     8  )
     9  
    10  // getgp returns the pointer to the current runtime.g.
    11  //
    12  //go:linkname getgp github.com/timandy/routine/g.getgp
    13  func getgp() unsafe.Pointer
    14  
    15  // getgt returns the type of runtime.g.
    16  //
    17  //go:linkname getgt github.com/timandy/routine/g.getgt
    18  func getgt() reflect.Type