runtime_go1.9.go 530 B

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