Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62321
b: refs/heads/master
c: 99bc2fc
h: refs/heads/master
i:
  62319: ea44fe4
v: v3
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Jul 22, 2007
1 parent 3289551 commit 63f9a55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 820de5c39ef7f6866d2c9e6c7d208bcd2a6e1942
refs/heads/master: 99bc2fcb283852931fb6bbef40f3df8316b59000
10 changes: 6 additions & 4 deletions trunk/kernel/hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@ static void enqueue_hrtimer(struct hrtimer *timer,
struct rb_node **link = &base->active.rb_node;
struct rb_node *parent = NULL;
struct hrtimer *entry;
int leftmost = 1;

/*
* Find the right place in the rbtree:
Expand All @@ -697,18 +698,19 @@ static void enqueue_hrtimer(struct hrtimer *timer,
* We dont care about collisions. Nodes with
* the same expiry time stay together.
*/
if (timer->expires.tv64 < entry->expires.tv64)
if (timer->expires.tv64 < entry->expires.tv64) {
link = &(*link)->rb_left;
else
} else {
link = &(*link)->rb_right;
leftmost = 0;
}
}

/*
* Insert the timer to the rbtree and check whether it
* replaces the first pending timer
*/
if (!base->first || timer->expires.tv64 <
rb_entry(base->first, struct hrtimer, node)->expires.tv64) {
if (leftmost) {
/*
* Reprogram the clock event device. When the timer is already
* expired hrtimer_enqueue_reprogram has either called the
Expand Down

0 comments on commit 63f9a55

Please sign in to comment.