summaryrefslogtreecommitdiff
path: root/kernel/futex.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-11-24 19:54:37 +0100
committerThomas Gleixner <tglx@linutronix.de>2008-11-24 19:54:37 +0100
commit3e1d7a6219ab64e13b10b1a77c0625db9a8bd8db (patch)
treec682da7317845d7b1336e3d8498cf83bdf8f5900 /kernel/futex.c
parent42569c39917a08e8de1e8b5685463be7b74baebd (diff)
parent13d428afc007fcfcd6deeb215618f54cf9c0cae6 (diff)
Merge branch 'linus' into core/futexes
Diffstat (limited to 'kernel/futex.c')
-rw-r--r--kernel/futex.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index 62cbd648e28a..e10c5c8786a6 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1229,13 +1229,16 @@ static int futex_wait(u32 __user *uaddr, int fshared,
if (!abs_time)
schedule();
else {
+ unsigned long slack;
+ slack = current->timer_slack_ns;
+ if (rt_task(current))
+ slack = 0;
hrtimer_init_on_stack(&t.timer, CLOCK_MONOTONIC,
HRTIMER_MODE_ABS);
hrtimer_init_sleeper(&t, current);
- t.timer.expires = *abs_time;
+ hrtimer_set_expires_range_ns(&t.timer, *abs_time, slack);
- hrtimer_start(&t.timer, t.timer.expires,
- HRTIMER_MODE_ABS);
+ hrtimer_start_expires(&t.timer, HRTIMER_MODE_ABS);
if (!hrtimer_active(&t.timer))
t.task = NULL;
@@ -1337,7 +1340,7 @@ static int futex_lock_pi(u32 __user *uaddr, int fshared,
hrtimer_init_on_stack(&to->timer, CLOCK_REALTIME,
HRTIMER_MODE_ABS);
hrtimer_init_sleeper(to, current);
- to->timer.expires = *time;
+ hrtimer_set_expires(&to->timer, *time);
}
q.pi_state = NULL;