Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 178023
b: refs/heads/master
c: b9f8fcd
h: refs/heads/master
i:
  178021: e14929c
  178019: acbbd1f
  178015: 34f0146
v: v3
  • Loading branch information
David Miller authored and Ingo Molnar committed Dec 15, 2009
1 parent 71c9e98 commit 48093d7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 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: 1a551ae715825bb2a2107a2dd68de024a1fa4e32
refs/heads/master: b9f8fcd55bbdb037e5332dbdb7b494f0b70861ac
23 changes: 15 additions & 8 deletions trunk/kernel/sched_clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,18 @@ void sched_clock_idle_wakeup_event(u64 delta_ns)
}
EXPORT_SYMBOL_GPL(sched_clock_idle_wakeup_event);

unsigned long long cpu_clock(int cpu)
{
unsigned long long clock;
unsigned long flags;

local_irq_save(flags);
clock = sched_clock_cpu(cpu);
local_irq_restore(flags);

return clock;
}

#else /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */

void sched_clock_init(void)
Expand All @@ -251,17 +263,12 @@ u64 sched_clock_cpu(int cpu)
return sched_clock();
}

#endif /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */

unsigned long long cpu_clock(int cpu)
{
unsigned long long clock;
unsigned long flags;
return sched_clock_cpu(cpu);
}

local_irq_save(flags);
clock = sched_clock_cpu(cpu);
local_irq_restore(flags);
#endif /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */

return clock;
}
EXPORT_SYMBOL_GPL(cpu_clock);

0 comments on commit 48093d7

Please sign in to comment.