aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2015-08-09 07:18:50 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2015-08-09 07:20:13 -0400
commit13e68a73175041c83713fd1905c65fe612f73862 (patch)
treebe3edeaac8b1b34714dd75d54d17f1ec88ecac35 /kernel/time
parente82bc71470695e6a8a319962737b4abff85bf0c6 (diff)
Augment rt_task() with is_realtime()
Whenever the kernel checks for rt_task() to avoid delaying real-time tasks, we want it to also not delay LITMUS^RT tasks. Hence, most calls to rt_task() should be matched by an equivalent call to is_realtime(). Notably, this affects the implementations of select() and nanosleep(), which use timer_slack_ns when setting up timers for non-real-time tasks.
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/hrtimer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 22f9156f19d2..d5a8e4db0bf9 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -58,6 +58,8 @@
58 58
59#include "tick-internal.h" 59#include "tick-internal.h"
60 60
61#include <litmus/litmus.h> /* for is_realtime() */
62
61/* 63/*
62 * The timer bases: 64 * The timer bases:
63 * 65 *
@@ -1659,7 +1661,7 @@ long hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp,
1659 unsigned long slack; 1661 unsigned long slack;
1660 1662
1661 slack = current->timer_slack_ns; 1663 slack = current->timer_slack_ns;
1662 if (dl_task(current) || rt_task(current)) 1664 if (dl_task(current) || rt_task(current) || is_realtime(current))
1663 slack = 0; 1665 slack = 0;
1664 1666
1665 hrtimer_init_on_stack(&t.timer, clockid, mode); 1667 hrtimer_init_on_stack(&t.timer, clockid, mode);