]> git.neil.brown.name Git - history.git/commitdiff
[SPARC]: Add stub sched_clock() implementation.
authorPete Zaitcev <zaitcev@redhat.com>
Tue, 25 Nov 2003 09:49:02 +0000 (01:49 -0800)
committerDavid S. Miller <davem@nuts.ninka.net>
Tue, 25 Nov 2003 09:49:02 +0000 (01:49 -0800)
arch/sparc/kernel/time.c

index 20ba51723a400cb3a8f8ab17fefe52ce8968b83c..16da0ab72f0c1b1eada3ebeb3371b96a39d3b6d7 100644 (file)
@@ -472,6 +472,15 @@ extern __inline__ unsigned long do_gettimeoffset(void)
        return (*master_l10_counter >> 10) & 0x1fffff;
 }
 
+/*
+ * Returns nanoseconds
+ * XXX This is a suboptimal implementation.
+ */
+unsigned long long sched_clock(void)
+{
+       return (unsigned long long)jiffies * (1000000000 / HZ);
+}
+
 /* Ok, my cute asm atomicity trick doesn't work anymore.
  * There are just too many variables that need to be protected
  * now (both members of xtime, wall_jiffies, et al.)