Bug fix to apply token bucket limits to real-time tasks
authorAndy Bavier <acb@cs.princeton.edu>
Tue, 14 Nov 2006 02:20:56 +0000 (02:20 +0000)
committerAndy Bavier <acb@cs.princeton.edu>
Tue, 14 Nov 2006 02:20:56 +0000 (02:20 +0000)
kernel/sched.c

index fa5360e..54b5842 100644 (file)
@@ -3155,7 +3155,7 @@ void scheduler_tick(void)
                 * RR tasks need a special form of timeslice management.
                 * FIFO tasks have no timeslices.
                 */
-               if ((p->policy == SCHED_RR) && !--p->time_slice) {
+               if ((p->policy == SCHED_RR) && vx_need_resched(p)) {
                        p->time_slice = task_timeslice(p);
                        p->first_time_slice = 0;
                        set_tsk_need_resched(p);