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