Version:  2.0.40 2.2.26 2.4.37 2.6.39 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 3.15

Linux/include/linux/sched/rt.h

  1 #ifndef _SCHED_RT_H
  2 #define _SCHED_RT_H
  3 
  4 #include <linux/sched/prio.h>
  5 
  6 static inline int rt_prio(int prio)
  7 {
  8         if (unlikely(prio < MAX_RT_PRIO))
  9                 return 1;
 10         return 0;
 11 }
 12 
 13 static inline int rt_task(struct task_struct *p)
 14 {
 15         return rt_prio(p->prio);
 16 }
 17 
 18 #ifdef CONFIG_RT_MUTEXES
 19 extern int rt_mutex_getprio(struct task_struct *p);
 20 extern void rt_mutex_setprio(struct task_struct *p, int prio);
 21 extern int rt_mutex_check_prio(struct task_struct *task, int newprio);
 22 extern struct task_struct *rt_mutex_get_top_task(struct task_struct *task);
 23 extern void rt_mutex_adjust_pi(struct task_struct *p);
 24 static inline bool tsk_is_pi_blocked(struct task_struct *tsk)
 25 {
 26         return tsk->pi_blocked_on != NULL;
 27 }
 28 #else
 29 static inline int rt_mutex_getprio(struct task_struct *p)
 30 {
 31         return p->normal_prio;
 32 }
 33 
 34 static inline int rt_mutex_check_prio(struct task_struct *task, int newprio)
 35 {
 36         return 0;
 37 }
 38 
 39 static inline struct task_struct *rt_mutex_get_top_task(struct task_struct *task)
 40 {
 41         return NULL;
 42 }
 43 # define rt_mutex_adjust_pi(p)          do { } while (0)
 44 static inline bool tsk_is_pi_blocked(struct task_struct *tsk)
 45 {
 46         return false;
 47 }
 48 #endif
 49 
 50 extern void normalize_rt_tasks(void);
 51 
 52 
 53 /*
 54  * default timeslice is 100 msecs (used only for SCHED_RR tasks).
 55  * Timeslices get refilled after they expire.
 56  */
 57 #define RR_TIMESLICE            (100 * HZ / 1000)
 58 
 59 #endif /* _SCHED_RT_H */
 60 

This page was automatically generated by LXR 0.3.1 (source).  •  Linux is a registered trademark of Linus Torvalds  •  Contact us