Skip to content

Commit

Permalink
hrtimer: more hrtimer_init_sleeper() fallout.
Browse files Browse the repository at this point in the history
Missed an instance...

  futex_lock_pi()
    hrtimer_init_sleeper()
    rt_mutex_timed_lock()
      rt_mutex_timed_fastlock()
        rt_mutex_slowlock()
          hrtimer_start()

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Feb 13, 2008
1 parent 96b5a46 commit 720a259
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kernel/rtmutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,9 +630,12 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state,
set_current_state(state);

/* Setup the timer, when timeout != NULL */
if (unlikely(timeout))
if (unlikely(timeout)) {
hrtimer_start(&timeout->timer, timeout->timer.expires,
HRTIMER_MODE_ABS);
if (!hrtimer_active(&timeout->timer))
timeout->task = NULL;
}

for (;;) {
/* Try to acquire the lock: */
Expand Down

0 comments on commit 720a259

Please sign in to comment.