github.com/liangmanlin/routine@v1.1.0/runtime.go (about)

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