Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108200
b: refs/heads/master
c: 2c3d103
h: refs/heads/master
v: v3
  • Loading branch information
Hugh Dickins authored and Ingo Molnar committed Jul 28, 2008
1 parent 26f7351 commit 9ca7985
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 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: e26873bb10f722f10b1af9de05119a3d7cbc07b2
refs/heads/master: 2c3d103ba90827cfb478bf10464d9b5b9cea369c
19 changes: 9 additions & 10 deletions trunk/kernel/sched_clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@
#include <linux/ktime.h>
#include <linux/module.h>

/*
* Scheduler clock - returns current time in nanosec units.
* This is default implementation.
* Architectures and sub-architectures can override this.
*/
unsigned long long __attribute__((weak)) sched_clock(void)
{
return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ);
}

#ifdef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK

Expand Down Expand Up @@ -321,16 +330,6 @@ EXPORT_SYMBOL_GPL(sched_clock_idle_wakeup_event);

#endif

/*
* Scheduler clock - returns current time in nanosec units.
* This is default implementation.
* Architectures and sub-architectures can override this.
*/
unsigned long long __attribute__((weak)) sched_clock(void)
{
return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ);
}

unsigned long long cpu_clock(int cpu)
{
unsigned long long clock;
Expand Down

0 comments on commit 9ca7985

Please sign in to comment.