sched_autogroup.h 793 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifdef CONFIG_SCHED_AUTOGROUP
  2. struct autogroup {
  3. struct kref kref;
  4. struct task_group *tg;
  5. struct rw_semaphore lock;
  6. unsigned long id;
  7. int nice;
  8. };
  9. static inline struct task_group *
  10. autogroup_task_group(struct task_struct *p, struct task_group *tg);
  11. #else /* !CONFIG_SCHED_AUTOGROUP */
  12. static inline void autogroup_init(struct task_struct *init_task) { }
  13. static inline void autogroup_free(struct task_group *tg) { }
  14. static inline bool task_group_is_autogroup(struct task_group *tg)
  15. {
  16. return 0;
  17. }
  18. static inline struct task_group *
  19. autogroup_task_group(struct task_struct *p, struct task_group *tg)
  20. {
  21. return tg;
  22. }
  23. #ifdef CONFIG_SCHED_DEBUG
  24. static inline int autogroup_path(struct task_group *tg, char *buf, int buflen)
  25. {
  26. return 0;
  27. }
  28. #endif
  29. #endif /* CONFIG_SCHED_AUTOGROUP */