sched.h 513 B

1234567891011121314151617181920212223
  1. #pragma once
  2. #include <common/glib.h>
  3. #include <process/process.h>
  4. /*
  5. * Scheduling policies
  6. */
  7. #define SCHED_NORMAL 0
  8. #define SCHED_FIFO 1
  9. #define SCHED_RR 2
  10. #define SCHED_BATCH 3
  11. /* SCHED_ISO: reserved but not implemented yet */
  12. #define SCHED_IDLE 5
  13. #define SCHED_DEADLINE 6
  14. #define SCHED_MAX_POLICY_NUM SCHED_DEADLINE
  15. #define IS_VALID_SCHED_POLICY(_policy) ((_policy) > 0 && (_policy) <= SCHED_MAX_POLICY_NUM)
  16. // ================= Rust 实现 =============
  17. extern void sched_init();
  18. extern void sched();