unsigned long slack;
int divfactor = 1000;
- if (task_nice(current))
+ if (task_nice(current) > 0)
divfactor = divfactor / 5;
slack = tv->tv_nsec / divfactor;
* Realtime tasks get a slack of 0 for obvious reasons.
*/
- if (current->policy == SCHED_FIFO ||
- current->policy == SCHED_RR)
+ if (rt_task(current))
return 0;
ktime_get_ts(&now);