summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2008-03-07 09:35:06 +0800
committerIngo Molnar <mingo@elte.hu>2008-03-07 16:43:00 +0100
commit1868f958eb56fc41c5985c8732e564a400c5fdf5 (patch)
tree4f8d83e487e5fa93e3d773591a26eda02d1b387d
parent150d8bede7f85eb00d8f4d628e6b0bae68739e3b (diff)
sched: fix the wrong time slice value for SCHED_FIFO tasks
Function sys_sched_rr_get_interval returns wrong time slice value for SCHED_FIFO tasks. The time slice for SCHED_FIFO tasks should be 0. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--kernel/sched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 63a469f8853d..5b13e4b0e009 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5100,7 +5100,7 @@ long sys_sched_rr_get_interval(pid_t pid, struct timespec __user *interval)
time_slice = 0;
if (p->policy == SCHED_RR) {
time_slice = DEF_TIMESLICE;
- } else {
+ } else if (p->policy != SCHED_FIFO) {
struct sched_entity *se = &p->se;
unsigned long flags;
struct rq *rq;