]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
sched: fix the wrong time slice value for SCHED_FIFO tasks
authorMiao Xie <miaox@cn.fujitsu.com>
Fri, 7 Mar 2008 01:35:06 +0000 (09:35 +0800)
committerIngo Molnar <mingo@elte.hu>
Fri, 7 Mar 2008 15:43:00 +0000 (16:43 +0100)
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>
kernel/sched.c

index 63a469f8853d32e1195bf2da27513500c6717d04..5b13e4b0e009881bac7eb3446acf5f437464c33c 100644 (file)
@@ -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;