forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sched/rt: Move rt specific bits into new header file
Move rt scheduler definitions out of include/linux/sched.h into new file include/linux/sched/rt.h Signed-off-by: Clark Williams <williams@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/20130207094707.7b9f825f@riff.lan Signed-off-by: Ingo Molnar <mingo@kernel.org>
- Loading branch information
Showing
22 changed files
with
81 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#ifndef _SCHED_RT_H | ||
#define _SCHED_RT_H | ||
|
||
/* | ||
* Priority of a process goes from 0..MAX_PRIO-1, valid RT | ||
* priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH | ||
* tasks are in the range MAX_RT_PRIO..MAX_PRIO-1. Priority | ||
* values are inverted: lower p->prio value means higher priority. | ||
* | ||
* The MAX_USER_RT_PRIO value allows the actual maximum | ||
* RT priority to be separate from the value exported to | ||
* user-space. This allows kernel threads to set their | ||
* priority to a value higher than any user task. Note: | ||
* MAX_RT_PRIO must not be smaller than MAX_USER_RT_PRIO. | ||
*/ | ||
|
||
#define MAX_USER_RT_PRIO 100 | ||
#define MAX_RT_PRIO MAX_USER_RT_PRIO | ||
|
||
#define MAX_PRIO (MAX_RT_PRIO + 40) | ||
#define DEFAULT_PRIO (MAX_RT_PRIO + 20) | ||
|
||
static inline int rt_prio(int prio) | ||
{ | ||
if (unlikely(prio < MAX_RT_PRIO)) | ||
return 1; | ||
return 0; | ||
} | ||
|
||
static inline int rt_task(struct task_struct *p) | ||
{ | ||
return rt_prio(p->prio); | ||
} | ||
|
||
#ifdef CONFIG_RT_MUTEXES | ||
extern int rt_mutex_getprio(struct task_struct *p); | ||
extern void rt_mutex_setprio(struct task_struct *p, int prio); | ||
extern void rt_mutex_adjust_pi(struct task_struct *p); | ||
static inline bool tsk_is_pi_blocked(struct task_struct *tsk) | ||
{ | ||
return tsk->pi_blocked_on != NULL; | ||
} | ||
#else | ||
static inline int rt_mutex_getprio(struct task_struct *p) | ||
{ | ||
return p->normal_prio; | ||
} | ||
# define rt_mutex_adjust_pi(p) do { } while (0) | ||
static inline bool tsk_is_pi_blocked(struct task_struct *tsk) | ||
{ | ||
return false; | ||
} | ||
#endif | ||
|
||
extern void normalize_rt_tasks(void); | ||
|
||
|
||
#endif /* _SCHED_RT_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters