[lkml]   [2005]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectAccessing monotonic clock from modules
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?


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
diff -u -r1.1.1.13 posix-timers.c
--- posix-timers.c 3 Mar 2005 08:53:02 -0000
+++ 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);

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
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-06-02 08:43    [W:0.078 / U:7.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site