clocks: export symbol do_posix_clock_monotonic_gettime
PATCH 1/1 clocks: export symbol do_posix_clock_monotonic_gettime
Getting access to monotonic time from modules is indispensable, for instance, for modular evdev to timestamp input events with a useful time information.
(I have already provided patch for evdev (also this one) in my previous, unanswered, post http://lkml.org/lkml/2005/10/6/92 )
kernel/posix-timers.c +1 -0
@@ -1219,6 +1219,7 @@ int do_posix_clock_monotonic_gettime(str {return do_posix_clock_monotonic_get (CLOCK_MONOTONIC , tp); } +EXPORT_SYMBOL_GPL (do_posix_clock_monotonic_gettime);int do_posix_clock_nosettime (clockid_t clockid,struct timespec *tp) {
Quoted 2 lines · Michal Maruška
Getting access to monotonic time from modules is indispensable, for instance, for modular evdev to timestamp input events with a useful time information.
could you also include the patch to add the user (say evdev) in the same patch please?
Re: [PATCH 2.6.15-rc7] clocks: export symbol do_posix_clock_monotonic_gettime + input: monotonic timestamps for evdev
Quoted 2 lines · Arjan van de Ven
could you also include the patch to add the user (say evdev) in the same patch please?
here is my complete patch updated for -rc7:
Summary:
- export do_posix_clock_monotonic_gettime
- implement an ioctl call for EVDEV to request timestamping of events with monotonic time.
For complete explanation see my previous mail http://lkml.org/lkml/2005/10/6/92
kernel/posix-timers.c +1 -0
@@ -1219,6 +1219,7 @@ int do_posix_clock_monotonic_gettime(str {return do_posix_clock_monotonic_get (CLOCK_MONOTONIC , tp); } +EXPORT_SYMBOL_GPL (do_posix_clock_monotonic_gettime);int do_posix_clock_nosettime (clockid_t clockid,struct timespec *tp) {
drivers/input/evdev.c +46 -2
92 lines not on this page · raw message
include/linux/input.h +9 -0
@@ -79,6 +79,15 @@ struct input_absinfo {#define EVIOCGRAB _IOW('E', 0x90, int)/* Grab/Release device */ +#define EVIOCTIME _IOW('E', 0x91, int)/* choose what kind of time to use for timestamps */ + +/* +* Time used to timestamp +*/ +#define EV_USE_MONOTONIC_TIME 0 +#define EV_USE_DAY_TIME 1 + +/* * Event types */