github.com/choleraehyq/piD@v0.0.11/runtime_go1.9.go (about)

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