realtime.h 869 B

123456789101112131415161718192021222324252627282930
  1. typedef vlong Time;
  2. typedef uvlong Ticks;
  3. typedef struct Schedevent Schedevent;
  4. enum {
  5. Onemicrosecond = 1000ULL,
  6. Onemillisecond = 1000000ULL,
  7. Onesecond = 1000000000ULL,
  8. };
  9. typedef enum SEvent {
  10. SAdmit, /* new proc arrives*/
  11. SRelease, /* released, but not yet scheduled (on qreleased) */
  12. SRun, /* one of this task's procs started running */
  13. SPreempt, /* the running proc was preempted */
  14. SBlock, /* none of the procs are runnable as a result of sleeping */
  15. SResume, /* one or more procs became runnable */
  16. SDeadline, /* proc's deadline */
  17. SYield, /* proc reached voluntary early deadline */
  18. SSlice, /* slice exhausted */
  19. SExpel, /* proc is gone */
  20. SResacq, /* acquire resource */
  21. SResrel, /* release resource */
  22. } SEvent;
  23. struct Schedevent {
  24. ushort tid; /* Task ID */
  25. SEvent etype; /* Event type */
  26. Time ts; /* Event time */
  27. };