sched_autogroup.h 712 B

1234567891011121314151617181920212223242526272829303132
  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 struct task_group *
  15. autogroup_task_group(struct task_struct *p, struct task_group *tg)
  16. {
  17. return tg;
  18. }
  19. #ifdef CONFIG_SCHED_DEBUG
  20. static inline int autogroup_path(struct task_group *tg, char *buf, int buflen)
  21. {
  22. return 0;
  23. }
  24. #endif
  25. #endif /* CONFIG_SCHED_AUTOGROUP */