Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19348
b: refs/heads/master
c: ff60a5d
h: refs/heads/master
v: v3
  • Loading branch information
akpm@osdl.org authored and Linus Torvalds committed Feb 1, 2006
1 parent eed07c6 commit 60255be
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a16a1c095a2392d49fafea22f3a508e268ef7167
refs/heads/master: ff60a5dc4fa584d47022d2533bc5c53b80096fb5
1 change: 1 addition & 0 deletions trunk/include/linux/hrtimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ enum hrtimer_restart {
enum hrtimer_state {
HRTIMER_INACTIVE, /* Timer is inactive */
HRTIMER_EXPIRED, /* Timer is expired */
HRTIMER_RUNNING, /* Timer is running the callback function */
HRTIMER_PENDING, /* Timer is pending */
};

Expand Down
5 changes: 5 additions & 0 deletions trunk/kernel/hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ static inline void run_hrtimer_queue(struct hrtimer_base *base)
fn = timer->function;
data = timer->data;
set_curr_timer(base, timer);
timer->state = HRTIMER_RUNNING;
__remove_hrtimer(timer, base);
spin_unlock_irq(&base->lock);

Expand All @@ -565,6 +566,10 @@ static inline void run_hrtimer_queue(struct hrtimer_base *base)

spin_lock_irq(&base->lock);

/* Another CPU has added back the timer */
if (timer->state != HRTIMER_RUNNING)
continue;

if (restart == HRTIMER_RESTART)
enqueue_hrtimer(timer, base);
else
Expand Down

0 comments on commit 60255be

Please sign in to comment.