Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91337
b: refs/heads/master
c: 833883d
h: refs/heads/master
i:
  91335: ee388f9
v: v3
  • Loading branch information
Dimitri Sivanich authored and Thomas Gleixner committed Apr 21, 2008
1 parent 6816acd commit 18f723d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 33 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: 833df317f9ada91488898b005f4641bb674a3bae
refs/heads/master: 833883d9ac4cfb31c1c4419335e68e6895a05b6b
64 changes: 32 additions & 32 deletions trunk/kernel/hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1238,51 +1238,51 @@ void hrtimer_run_pending(void)
/*
* Called from hardirq context every jiffy
*/
static inline void run_hrtimer_queue(struct hrtimer_cpu_base *cpu_base,
int index)
void hrtimer_run_queues(void)
{
struct rb_node *node;
struct hrtimer_clock_base *base = &cpu_base->clock_base[index];
struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases);
struct hrtimer_clock_base *base;
int index, gettime = 1;

if (!base->first)
if (hrtimer_hres_active())
return;

if (base->get_softirq_time)
base->softirq_time = base->get_softirq_time();

spin_lock(&cpu_base->lock);
for (index = 0; index < HRTIMER_MAX_CLOCK_BASES; index++) {
base = &cpu_base->clock_base[index];

while ((node = base->first)) {
struct hrtimer *timer;

timer = rb_entry(node, struct hrtimer, node);
if (base->softirq_time.tv64 <= timer->expires.tv64)
break;

if (timer->cb_mode == HRTIMER_CB_SOFTIRQ) {
__remove_hrtimer(timer, base, HRTIMER_STATE_PENDING, 0);
list_add_tail(&timer->cb_entry,
&base->cpu_base->cb_pending);
if (!base->first)
continue;

if (gettime) {
hrtimer_get_softirq_time(cpu_base);
gettime = 0;
}

__run_hrtimer(timer);
}
spin_unlock(&cpu_base->lock);
}
if (base->get_softirq_time)
base->softirq_time = base->get_softirq_time();

void hrtimer_run_queues(void)
{
struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases);
int i;
spin_lock(&cpu_base->lock);

if (hrtimer_hres_active())
return;
while ((node = base->first)) {
struct hrtimer *timer;

hrtimer_get_softirq_time(cpu_base);
timer = rb_entry(node, struct hrtimer, node);
if (base->softirq_time.tv64 <= timer->expires.tv64)
break;

for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++)
run_hrtimer_queue(cpu_base, i);
if (timer->cb_mode == HRTIMER_CB_SOFTIRQ) {
__remove_hrtimer(timer, base,
HRTIMER_STATE_PENDING, 0);
list_add_tail(&timer->cb_entry,
&base->cpu_base->cb_pending);
continue;
}

__run_hrtimer(timer);
}
spin_unlock(&cpu_base->lock);
}
}

/*
Expand Down

0 comments on commit 18f723d

Please sign in to comment.