1 #ifndef _LINUX_SCHED_RT_H
2 #define _LINUX_SCHED_RT_H
4 #include <linux/sched.h>
8 static inline int rt_prio(int prio)
10 if (unlikely(prio < MAX_RT_PRIO))
15 static inline int rt_task(struct task_struct *p)
17 return rt_prio(p->prio);
20 #ifdef CONFIG_RT_MUTEXES
21 extern int rt_mutex_getprio(struct task_struct *p);
22 extern void rt_mutex_setprio(struct task_struct *p, int prio);
23 extern int rt_mutex_get_effective_prio(struct task_struct *task, int newprio);
24 extern struct task_struct *rt_mutex_get_top_task(struct task_struct *task);
25 extern void rt_mutex_adjust_pi(struct task_struct *p);
26 static inline bool tsk_is_pi_blocked(struct task_struct *tsk)
28 return tsk->pi_blocked_on != NULL;
31 static inline int rt_mutex_getprio(struct task_struct *p)
33 return p->normal_prio;
36 static inline int rt_mutex_get_effective_prio(struct task_struct *task,
42 static inline struct task_struct *rt_mutex_get_top_task(struct task_struct *task)
46 # define rt_mutex_adjust_pi(p) do { } while (0)
47 static inline bool tsk_is_pi_blocked(struct task_struct *tsk)
53 extern void normalize_rt_tasks(void);
57 * default timeslice is 100 msecs (used only for SCHED_RR tasks).
58 * Timeslices get refilled after they expire.
60 #define RR_TIMESLICE (100 * HZ / 1000)
62 #endif /* _LINUX_SCHED_RT_H */