tos.h 664 B

1234567891011121314151617181920212223242526
  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. /* scratch space for kernel use (e.g., mips fp delay-slot execution) */
  20. ulong kscr[4];
  21. /* top of stack is here */
  22. };
  23. extern Tos *_tos;