Accessing monotonic clock from modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux