[PATCH] Consolidate default sched_clock()
Use attribute(weak). Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
5e07e1ccb0
commit
b035b6de24
@ -77,16 +77,6 @@ static unsigned long dummy_gettimeoffset(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Scheduler clock - returns current time in nanosec units.
|
||||
* This is the default implementation. Sub-architecture
|
||||
* implementations can override this.
|
||||
*/
|
||||
unsigned long long __attribute__((weak)) sched_clock(void)
|
||||
{
|
||||
return (unsigned long long)jiffies * (1000000000 / HZ);
|
||||
}
|
||||
|
||||
/*
|
||||
* An implementation of printk_clock() independent from
|
||||
* sched_clock(). This avoids non-bootable kernels when
|
||||
|
Reference in New Issue
Block a user