tos.h 562 B

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