diff options
Diffstat (limited to 'include/linux/sched/rt.h')
| -rw-r--r-- | include/linux/sched/rt.h | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/include/linux/sched/rt.h b/include/linux/sched/rt.h index 34e4ebea8fce..6341f5be6e24 100644 --- a/include/linux/sched/rt.h +++ b/include/linux/sched/rt.h | |||
| @@ -1,24 +1,7 @@ | |||
| 1 | #ifndef _SCHED_RT_H | 1 | #ifndef _SCHED_RT_H |
| 2 | #define _SCHED_RT_H | 2 | #define _SCHED_RT_H |
| 3 | 3 | ||
| 4 | /* | 4 | #include <linux/sched/prio.h> |
| 5 | * Priority of a process goes from 0..MAX_PRIO-1, valid RT | ||
| 6 | * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH | ||
| 7 | * tasks are in the range MAX_RT_PRIO..MAX_PRIO-1. Priority | ||
| 8 | * values are inverted: lower p->prio value means higher priority. | ||
| 9 | * | ||
| 10 | * The MAX_USER_RT_PRIO value allows the actual maximum | ||
| 11 | * RT priority to be separate from the value exported to | ||
| 12 | * user-space. This allows kernel threads to set their | ||
| 13 | * priority to a value higher than any user task. Note: | ||
| 14 | * MAX_RT_PRIO must not be smaller than MAX_USER_RT_PRIO. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #define MAX_USER_RT_PRIO 100 | ||
| 18 | #define MAX_RT_PRIO MAX_USER_RT_PRIO | ||
| 19 | |||
| 20 | #define MAX_PRIO (MAX_RT_PRIO + 40) | ||
| 21 | #define DEFAULT_PRIO (MAX_RT_PRIO + 20) | ||
| 22 | 5 | ||
| 23 | static inline int rt_prio(int prio) | 6 | static inline int rt_prio(int prio) |
| 24 | { | 7 | { |
| @@ -35,6 +18,7 @@ static inline int rt_task(struct task_struct *p) | |||
| 35 | #ifdef CONFIG_RT_MUTEXES | 18 | #ifdef CONFIG_RT_MUTEXES |
| 36 | extern int rt_mutex_getprio(struct task_struct *p); | 19 | extern int rt_mutex_getprio(struct task_struct *p); |
| 37 | extern void rt_mutex_setprio(struct task_struct *p, int prio); | 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); | ||
| 38 | extern struct task_struct *rt_mutex_get_top_task(struct task_struct *task); | 22 | extern struct task_struct *rt_mutex_get_top_task(struct task_struct *task); |
| 39 | extern void rt_mutex_adjust_pi(struct task_struct *p); | 23 | extern void rt_mutex_adjust_pi(struct task_struct *p); |
| 40 | static inline bool tsk_is_pi_blocked(struct task_struct *tsk) | 24 | static inline bool tsk_is_pi_blocked(struct task_struct *tsk) |
| @@ -46,6 +30,12 @@ static inline int rt_mutex_getprio(struct task_struct *p) | |||
| 46 | { | 30 | { |
| 47 | return p->normal_prio; | 31 | return p->normal_prio; |
| 48 | } | 32 | } |
| 33 | |||
| 34 | static inline int rt_mutex_check_prio(struct task_struct *task, int newprio) | ||
| 35 | { | ||
| 36 | return 0; | ||
| 37 | } | ||
| 38 | |||
| 49 | static inline struct task_struct *rt_mutex_get_top_task(struct task_struct *task) | 39 | static inline struct task_struct *rt_mutex_get_top_task(struct task_struct *task) |
| 50 | { | 40 | { |
| 51 | return NULL; | 41 | return NULL; |
