tos.h 575 B

123456789101112131415161718192021222324
  1. typedef struct Tos Tos;
  2. typedef struct Plink Plink;
  3. #pragma incomplete Plink
  4. struct Tos {
  5. struct /* Per process profiling */
  6. {
  7. Plink *pp; /* known to be 0(ptr) */
  8. Plink *next; /* known to be 4(ptr) */
  9. Plink *last;
  10. Plink *first;
  11. ulong pid;
  12. ulong what;
  13. } prof;
  14. uvlong cyclefreq; /* cycle clock frequency if there is one, 0 otherwise */
  15. vlong kcycles; /* cycles spent in kernel */
  16. vlong pcycles; /* cycles spent in process (kernel + user) */
  17. ulong pid; /* might as well put the pid here */
  18. ulong clock;
  19. /* top of stack is here */
  20. };
  21. extern Tos *_tos;