1
0

tos.h 791 B

123456789101112131415161718192021222324252627282930313233343536
  1. typedef struct Plink Plink;
  2. typedef struct Tos Tos;
  3. #pragma incomplete Plink
  4. struct Tos
  5. {
  6. struct /* Per process profiling */
  7. {
  8. Plink *pp; /* known to be 0(ptr) */
  9. Plink *next; /* known to be 4(ptr) */
  10. Plink *last;
  11. Plink *first;
  12. ulong pid;
  13. ulong what;
  14. } prof;
  15. uvlong cyclefreq; /* cycle clock frequency if there is one, 0 otherwise */
  16. vlong kcycles; /* cycles spent in kernel */
  17. vlong pcycles; /* cycles spent in process (kernel + user) */
  18. ulong clock;
  19. /*
  20. * Fields below are not available on Plan 9 kernels.
  21. */
  22. int nixtype; /* role of the core we are running at */
  23. int core; /* core we are running at */
  24. /* Used as TLS data in Go.*/
  25. void *Go_g; /* goroutines */
  26. void *Go_m; /* go threads */
  27. uvlong pid;
  28. /* top of stack is here */
  29. };
  30. extern Tos *_tos;