github.com/choleraehyq/pid@v0.0.18/runtime_go1.9.go (about) 1 //go:build gc && go1.9 2 // +build gc,go1.9 3 4 package goid 5 6 type stack struct { 7 lo uintptr 8 hi uintptr 9 } 10 11 type gobuf struct { 12 sp uintptr 13 pc uintptr 14 g uintptr 15 ctxt uintptr 16 ret uintptr 17 lr uintptr 18 bp uintptr 19 } 20 21 type g struct { 22 stack stack 23 stackguard0 uintptr 24 stackguard1 uintptr 25 26 _panic uintptr 27 _defer uintptr 28 m uintptr 29 sched gobuf 30 syscallsp uintptr 31 syscallpc uintptr 32 stktopsp uintptr 33 param uintptr 34 atomicstatus uint32 35 stackLock uint32 36 goid int64 // Here it is! 37 } 38 39 type gsignalStack struct { 40 stack stack 41 stackguard0 uintptr 42 stackguard1 uintptr 43 stktopsp uintptr 44 }