]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Add sched_clock on v850
authorMiles Bader <miles@lsi.nec.co.jp>
Wed, 8 Oct 2003 01:16:36 +0000 (18:16 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 8 Oct 2003 01:16:36 +0000 (18:16 -0700)
This is a horrid implementation, but whatever.

arch/v850/kernel/time.c

index 4f965560036e9b11703c0675beecce2d0b1f54ec..00be2d7c75c08aa7ad4eff2df92020cca7a65056 100644 (file)
@@ -32,6 +32,14 @@ EXPORT_SYMBOL(jiffies_64);
 
 #define TICK_SIZE      (tick_nsec / 1000)
 
+/*
+ * Scheduler clock - returns current time in nanosec units.
+ */
+unsigned long long sched_clock(void)
+{
+       return (unsigned long long)jiffies * (1000000000 / HZ);
+}
+
 static inline void do_profile (unsigned long pc)
 {
        if (prof_buffer && current->pid) {