lkml.org 
[lkml]   [2005]   [Jun]   [2]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From"Mikael Starvik" <>
SubjectAccessing monotonic clock from modules
DateThu, 2 Jun 2005 08:36:48 +0200
We would like to get the posix monotonic clock from a loadable module.
Would a patch to make do_posix_clock_monotonic_gettime exported ok or
should we do it in some other way?

/Mikael

Here is such a patch (against 2.6.11):

Index: posix-timers.c
===================================================================
RCS file: /usr/local/cvs/linux/os/linux-2.6/kernel/posix-timers.c,v
retrieving revision 1.1.1.13
diff -u -r1.1.1.13 posix-timers.c
--- posix-timers.c	3 Mar 2005 08:53:02 -0000	1.1.1.13
+++ posix-timers.c	2 Jun 2005 06:35:30 -0000
@@ -35,6 +35,7 @@
 #include <linux/interrupt.h>
 #include <linux/slab.h>
 #include <linux/time.h>
+#include <linux/module.h>
 
 #include <asm/uaccess.h>
 #include <asm/semaphore.h>
@@ -191,6 +192,8 @@
 int do_posix_clock_monotonic_gettime(struct timespec *tp);
 static struct k_itimer *lock_timer(timer_t timer_id, unsigned long *flags);
 
+EXPORT_SYMBOL(do_posix_clock_monotonic_gettime);
+
 static inline void unlock_timer(struct k_itimer *timr, unsigned long flags)
 {
 	spin_unlock_irqrestore(&timr->it_lock, flags);
-
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-06-02 06:43    [W:0.244 / U:0.170 seconds]
©2003-2008 Jasper Spaans