lkml.org 
[lkml]   [2003]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH][v850] Add sched_clock on v850
Date
From
Linus, please apply.

This is a horrid implementation, but whatever.

diff -ruN -X../cludes linux-2.6.0-test6-moo/arch/v850/kernel/time.c linux-2.6.0-test6-moo-v850-20031006/arch/v850/kernel/time.c
--- linux-2.6.0-test6-moo/arch/v850/kernel/time.c 2003-07-14 13:14:39.000000000 +0900
+++ linux-2.6.0-test6-moo-v850-20031006/arch/v850/kernel/time.c 2003-10-03 17:06:47.000000000 +0900
@@ -29,6 +29,14 @@

#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) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.248 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site