diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 0bc81a151e50..6f167645e7e2 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -495,8 +495,11 @@ struct signal_struct { | |||
495 | 495 | ||
496 | #define MAX_PRIO (MAX_RT_PRIO + 40) | 496 | #define MAX_PRIO (MAX_RT_PRIO + 40) |
497 | 497 | ||
498 | #define rt_task(p) (unlikely((p)->prio < MAX_RT_PRIO)) | 498 | #define rt_prio(prio) unlikely((prio) < MAX_RT_PRIO) |
499 | #define rt_task(p) rt_prio((p)->prio) | ||
499 | #define batch_task(p) (unlikely((p)->policy == SCHED_BATCH)) | 500 | #define batch_task(p) (unlikely((p)->policy == SCHED_BATCH)) |
501 | #define has_rt_policy(p) \ | ||
502 | unlikely((p)->policy != SCHED_NORMAL && (p)->policy != SCHED_BATCH) | ||
500 | 503 | ||
501 | /* | 504 | /* |
502 | * Some day this will be a full-fledged user tracking system.. | 505 | * Some day this will be a full-fledged user tracking system.. |
@@ -725,7 +728,7 @@ struct task_struct { | |||
725 | #endif | 728 | #endif |
726 | #endif | 729 | #endif |
727 | int load_weight; /* for niceness load balancing purposes */ | 730 | int load_weight; /* for niceness load balancing purposes */ |
728 | int prio, static_prio; | 731 | int prio, static_prio, normal_prio; |
729 | struct list_head run_list; | 732 | struct list_head run_list; |
730 | prio_array_t *array; | 733 | prio_array_t *array; |
731 | 734 | ||
@@ -852,6 +855,9 @@ struct task_struct { | |||
852 | /* Protection of (de-)allocation: mm, files, fs, tty, keyrings */ | 855 | /* Protection of (de-)allocation: mm, files, fs, tty, keyrings */ |
853 | spinlock_t alloc_lock; | 856 | spinlock_t alloc_lock; |
854 | 857 | ||
858 | /* Protection of the PI data structures: */ | ||
859 | spinlock_t pi_lock; | ||
860 | |||
855 | #ifdef CONFIG_DEBUG_MUTEXES | 861 | #ifdef CONFIG_DEBUG_MUTEXES |
856 | /* mutex deadlock detection */ | 862 | /* mutex deadlock detection */ |
857 | struct mutex_waiter *blocked_on; | 863 | struct mutex_waiter *blocked_on; |
@@ -1018,6 +1024,17 @@ static inline void idle_task_exit(void) {} | |||
1018 | #endif | 1024 | #endif |
1019 | 1025 | ||
1020 | extern void sched_idle_next(void); | 1026 | extern void sched_idle_next(void); |
1027 | |||
1028 | #ifdef CONFIG_RT_MUTEXES | ||
1029 | extern int rt_mutex_getprio(task_t *p); | ||
1030 | extern void rt_mutex_setprio(task_t *p, int prio); | ||
1031 | #else | ||
1032 | static inline int rt_mutex_getprio(task_t *p) | ||
1033 | { | ||
1034 | return p->normal_prio; | ||
1035 | } | ||
1036 | #endif | ||
1037 | |||
1021 | extern void set_user_nice(task_t *p, long nice); | 1038 | extern void set_user_nice(task_t *p, long nice); |
1022 | extern int task_prio(const task_t *p); | 1039 | extern int task_prio(const task_t *p); |
1023 | extern int task_nice(const task_t *p); | 1040 | extern int task_nice(const task_t *p); |