Module: xenomai-forge
Branch: next
Commit: ecd37b838baa35e83704f4e8e56bef0ccc75cb12
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=ecd37b838baa35e83704f4e8e56bef0ccc75cb12

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Jul  3 12:08:55 2013 +0200

cobalt: fan out tick/ns converters to proper locations

These few routines are one liners we don't want to inline, wrapping to
generic arithmetic code. Duplicating them for kernel and lib/cobalt
usage is saner than keeping non-inlined code in headers.

---

 include/cobalt/Makefile.am                         |    1 +
 include/cobalt/Makefile.in                         |    1 +
 include/cobalt/asm-generic/Makefile.am             |   21 ++--
 include/cobalt/asm-generic/Makefile.in             |   19 ++--
 include/cobalt/asm-generic/arith.h                 |    5 +-
 include/cobalt/asm-generic/uapi/Makefile.am        |    4 +-
 include/cobalt/asm-generic/uapi/Makefile.in        |    4 +-
 include/cobalt/asm-x86/arith.h                     |    6 +-
 include/cobalt/kernel/clock.h                      |   12 ++-
 include/cobalt/{asm-generic/timeconv.h => ticks.h} |   27 ++++--
 include/copperplate/clockobj.h                     |    9 +-
 kernel/cobalt/arith.c                              |    9 +--
 kernel/cobalt/clock.c                              |   99 +++++++++++++++++++-
 kernel/cobalt/init.c                               |    6 +-
 kernel/cobalt/pod.c                                |    8 +-
 kernel/cobalt/posix/clock.c                        |    2 +-
 kernel/cobalt/posix/internal.h                     |    4 +-
 kernel/cobalt/posix/thread.c                       |    2 +-
 kernel/cobalt/posix/timer.c                        |    2 +-
 kernel/cobalt/rtdm/drvlib.c                        |    2 +-
 kernel/cobalt/sched.c                              |    6 +-
 kernel/cobalt/shadow.c                             |    2 +-
 kernel/cobalt/timer.c                              |   20 ++--
 kernel/drivers/ipc/internal.h                      |    2 +-
 lib/cobalt/Makefile.am                             |    1 +
 lib/cobalt/Makefile.in                             |   14 +++-
 lib/cobalt/clock.c                                 |    9 +-
 lib/cobalt/init.c                                  |    4 +-
 lib/cobalt/internal.c                              |    2 -
 lib/cobalt/internal.h                              |    4 +
 kernel/cobalt/timeconv.h => lib/cobalt/ticks.c     |   58 ++++++------
 lib/copperplate/clockobj.c                         |    4 +-
 32 files changed, 243 insertions(+), 126 deletions(-)

diff --git a/include/cobalt/Makefile.am b/include/cobalt/Makefile.am
index bc5f9fc..cece4eb 100644
--- a/include/cobalt/Makefile.am
+++ b/include/cobalt/Makefile.am
@@ -11,6 +11,7 @@ includesub_HEADERS =  \
        stdio.h         \
        stdlib.h        \
        syslog.h        \
+       ticks.h         \
        time.h          \
        trace.h         \
        unistd.h        \
diff --git a/include/cobalt/Makefile.in b/include/cobalt/Makefile.in
index d19642a..57ed864 100644
--- a/include/cobalt/Makefile.in
+++ b/include/cobalt/Makefile.in
@@ -322,6 +322,7 @@ includesub_HEADERS = \
        stdio.h         \
        stdlib.h        \
        syslog.h        \
+       ticks.h         \
        time.h          \
        trace.h         \
        unistd.h        \
diff --git a/include/cobalt/asm-generic/Makefile.am 
b/include/cobalt/asm-generic/Makefile.am
index 8d8e9ec..6371d60 100644
--- a/include/cobalt/asm-generic/Makefile.am
+++ b/include/cobalt/asm-generic/Makefile.am
@@ -1,16 +1,15 @@
 includesubdir = $(includedir)/asm-generic
 
-includesub_HEADERS = \
-       arith.h \
-       atomic.h \
-       features.h \
-       machine.h \
-       mayday.h \
-       pci_ids.h \
-       stack.h \
-       syscall.h \
-       thread.h \
-       timeconv.h \
+includesub_HEADERS =   \
+       arith.h         \
+       atomic.h        \
+       features.h      \
+       machine.h       \
+       mayday.h        \
+       pci_ids.h       \
+       stack.h         \
+       syscall.h       \
+       thread.h        \
        wrappers.h
 
 SUBDIRS = uapi ipipe
diff --git a/include/cobalt/asm-generic/Makefile.in 
b/include/cobalt/asm-generic/Makefile.in
index 2feb1f7..73ce649 100644
--- a/include/cobalt/asm-generic/Makefile.in
+++ b/include/cobalt/asm-generic/Makefile.in
@@ -312,16 +312,15 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 includesubdir = $(includedir)/asm-generic
 includesub_HEADERS = \
-       arith.h \
-       atomic.h \
-       features.h \
-       machine.h \
-       mayday.h \
-       pci_ids.h \
-       stack.h \
-       syscall.h \
-       thread.h \
-       timeconv.h \
+       arith.h         \
+       atomic.h        \
+       features.h      \
+       machine.h       \
+       mayday.h        \
+       pci_ids.h       \
+       stack.h         \
+       syscall.h       \
+       thread.h        \
        wrappers.h
 
 SUBDIRS = uapi ipipe
diff --git a/include/cobalt/asm-generic/arith.h 
b/include/cobalt/asm-generic/arith.h
index 337adb1..d878713 100644
--- a/include/cobalt/asm-generic/arith.h
+++ b/include/cobalt/asm-generic/arith.h
@@ -381,14 +381,11 @@ static inline void xnarch_init_llmulshft(const unsigned 
m_in,
 
 #define xnarch_ullmod(ull,uld,rem)   ({ xnarch_ulldiv(ull,uld,rem); (*rem); })
 #define xnarch_uldiv(ull, d)         xnarch_uldivrem(ull, d, NULL)
-#define xnarch_ulmod(ull, d)         ({ u_long _rem;                    \
+#define xnarch_ulmod(ull, d)         ({ unsigned long _rem;    \
                                        xnarch_uldivrem(ull,d,&_rem); _rem; })
 
 #define xnarch_div64(a,b)            xnarch_divmod64((a),(b),NULL)
 #define xnarch_mod64(a,b)            ({ unsigned long long _rem; \
                                        xnarch_divmod64((a),(b),&_rem); _rem; })
 
-unsigned long long xnarch_divrem_billion(unsigned long long value,
-                                        unsigned long *rem);
-
 #endif /* _COBALT_ASM_GENERIC_ARITH_H */
diff --git a/include/cobalt/asm-generic/uapi/Makefile.am 
b/include/cobalt/asm-generic/uapi/Makefile.am
index b80ee36..2915821 100644
--- a/include/cobalt/asm-generic/uapi/Makefile.am
+++ b/include/cobalt/asm-generic/uapi/Makefile.am
@@ -1,5 +1,5 @@
 includesubdir = $(includedir)/asm-generic/uapi
 
 includesub_HEADERS =   \
-       syscall.h       \
-       features.h
+       features.h      \
+       syscall.h
diff --git a/include/cobalt/asm-generic/uapi/Makefile.in 
b/include/cobalt/asm-generic/uapi/Makefile.in
index 396c5bc..429282f 100644
--- a/include/cobalt/asm-generic/uapi/Makefile.in
+++ b/include/cobalt/asm-generic/uapi/Makefile.in
@@ -274,8 +274,8 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 includesubdir = $(includedir)/asm-generic/uapi
 includesub_HEADERS = \
-       syscall.h       \
-       features.h
+       features.h      \
+       syscall.h
 
 all: all-am
 
diff --git a/include/cobalt/asm-x86/arith.h b/include/cobalt/asm-x86/arith.h
index 057d237..d9f6a77 100644
--- a/include/cobalt/asm-x86/arith.h
+++ b/include/cobalt/asm-x86/arith.h
@@ -73,10 +73,10 @@ static inline unsigned long long 
mach_x86_32_div96by32(const unsigned long long
                                                       const unsigned long d,
                                                       unsigned long *const rp)
 {
-    u_long rh;
-    const u_long qh = xnarch_uldivrem(h, d, &rh);
+    unsigned long rh;
+    const unsigned long qh = xnarch_uldivrem(h, d, &rh);
     const unsigned long long t = xnarch_u64fromu32(rh, l);
-    const u_long ql = xnarch_uldivrem(t, d, rp);
+    const unsigned long ql = xnarch_uldivrem(t, d, rp);
 
     return xnarch_u64fromu32(qh, ql);
 }
diff --git a/include/cobalt/kernel/clock.h b/include/cobalt/kernel/clock.h
index ae01bc6..f4ad8ad 100644
--- a/include/cobalt/kernel/clock.h
+++ b/include/cobalt/kernel/clock.h
@@ -29,7 +29,6 @@
 #include <cobalt/kernel/list.h>
 #include <cobalt/kernel/vfile.h>
 #include <cobalt/uapi/sys/types.h>
-#include <asm-generic/xenomai/timeconv.h>
 
 #define XNTBLCK  0x00000001    /* Time base is locked. */
 
@@ -71,8 +70,19 @@ static inline xnticks_t xnclock_read_raw(void)
        return t;
 }
 
+xnsticks_t xnclock_ticks_to_ns(xnsticks_t ticks);
+
+xnsticks_t xnclock_ticks_to_ns_rounded(xnsticks_t ticks);
+
+xnsticks_t xnclock_ns_to_ticks(xnsticks_t ns);
+
+unsigned long long xnclock_divrem_billion(unsigned long long value,
+                                         unsigned long *rem);
+
 void xnclock_adjust(xnsticks_t delta);
 
+void xnclock_init(unsigned long long freq);
+
 void xnclock_init_proc(void);
 
 void xnclock_cleanup_proc(void);
diff --git a/include/cobalt/asm-generic/timeconv.h b/include/cobalt/ticks.h
similarity index 60%
rename from include/cobalt/asm-generic/timeconv.h
rename to include/cobalt/ticks.h
index 0c06a12..a77789d 100644
--- a/include/cobalt/asm-generic/timeconv.h
+++ b/include/cobalt/ticks.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Jan Kiszka <jan.kis...@siemens.com>.
+ * Copyright (C) 2013 Philippe Gerum <r...@xenomai.org>.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -15,12 +15,25 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
  */
+#ifndef _COBALT_TICKS_H
+#define _COBALT_TICKS_H
 
-#ifndef _COBALT_ASM_GENERIC_TIMECONV_H
-#define _COBALT_ASM_GENERIC_TIMECONV_H
+#include <cobalt/uapi/sys/types.h>
 
-long long xnarch_tsc_to_ns(long long ticks);
-long long xnarch_tsc_to_ns_rounded(long long ticks);
-long long xnarch_ns_to_tsc(long long ns);
+#ifdef __cplusplus
+extern "C" {
+#endif
 
-#endif /* !_COBALT_ASM_GENERIC_TIMECONV_H */
+xnsticks_t cobalt_ticks_to_ns(xnsticks_t ticks);
+
+xnsticks_t cobalt_ticks_to_ns_rounded(xnsticks_t ticks);
+
+xnsticks_t cobalt_ns_to_ticks(xnsticks_t ns);
+
+unsigned long long cobalt_divrem_billion(unsigned long long value,
+                                        unsigned long *rem);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !_COBALT_TICKS_H */
diff --git a/include/copperplate/clockobj.h b/include/copperplate/clockobj.h
index 671339f..f03fd13 100644
--- a/include/copperplate/clockobj.h
+++ b/include/copperplate/clockobj.h
@@ -158,8 +158,7 @@ int clockobj_destroy(struct clockobj *clkobj);
 
 #ifdef CONFIG_XENO_COBALT
 
-#include <asm/xenomai/arith.h>
-#include <asm-generic/xenomai/timeconv.h>
+#include <cobalt/ticks.h>
 #include <asm/sysdeps/tsc.h>
 
 static inline ticks_t clockobj_get_tsc(void)
@@ -170,12 +169,12 @@ static inline ticks_t clockobj_get_tsc(void)
 
 static inline sticks_t clockobj_ns_to_tsc(sticks_t ns)
 {
-       return xnarch_ns_to_tsc(ns);
+       return cobalt_ns_to_ticks(ns);
 }
 
 static inline sticks_t clockobj_tsc_to_ns(sticks_t tsc)
 {
-       return xnarch_tsc_to_ns(tsc);
+       return cobalt_ticks_to_ns(tsc);
 }
 
 static inline
@@ -183,7 +182,7 @@ void clockobj_ns_to_timespec(ticks_t ns, struct timespec 
*ts)
 {
        unsigned long rem;
 
-       ts->tv_sec = xnarch_divrem_billion(ns, &rem);
+       ts->tv_sec = cobalt_divrem_billion(ns, &rem);
        ts->tv_nsec = rem;
 }
 
diff --git a/kernel/cobalt/arith.c b/kernel/cobalt/arith.c
index f1b1970..2e072ca 100644
--- a/kernel/cobalt/arith.c
+++ b/kernel/cobalt/arith.c
@@ -27,11 +27,10 @@
  *@{*/
 
 #include <linux/module.h>
-#include "timeconv.h"
 
 unsigned long long xnarch_generic_full_divmod64(unsigned long long a,
-                                                unsigned long long b,
-                                                unsigned long long *rem)
+                                               unsigned long long b,
+                                               unsigned long long *rem)
 {
        unsigned long long q = 0, r = a;
        int i;
@@ -50,8 +49,4 @@ unsigned long long xnarch_generic_full_divmod64(unsigned long 
long a,
 }
 EXPORT_SYMBOL_GPL(xnarch_generic_full_divmod64);
 
-EXPORT_SYMBOL_GPL(xnarch_tsc_to_ns);
-EXPORT_SYMBOL_GPL(xnarch_ns_to_tsc);
-EXPORT_SYMBOL_GPL(xnarch_divrem_billion);
-
 /*@}*/
diff --git a/kernel/cobalt/clock.c b/kernel/cobalt/clock.c
index f901e80..16d1dc5 100644
--- a/kernel/cobalt/clock.c
+++ b/kernel/cobalt/clock.c
@@ -29,6 +29,91 @@
 #include <cobalt/kernel/pod.h>
 #include <cobalt/kernel/timer.h>
 #include <cobalt/kernel/clock.h>
+#include <asm/xenomai/arith.h>
+
+static unsigned long long clockfreq;
+
+#ifdef XNARCH_HAVE_LLMULSHFT
+
+static unsigned int tsc_scale, tsc_shift;
+
+#ifdef XNARCH_HAVE_NODIV_LLIMD
+
+static struct xnarch_u32frac tsc_frac;
+static struct xnarch_u32frac bln_frac;
+
+long long xnclock_ns_to_ticks(long long ns)
+{
+       return xnarch_nodiv_llimd(ns, tsc_frac.frac, tsc_frac.integ);
+}
+
+unsigned long long xnclock_divrem_billion(unsigned long long value,
+                                         unsigned long *rem)
+{
+       unsigned long long q;
+       unsigned r;
+
+       q = xnarch_nodiv_ullimd(value, bln_frac.frac, bln_frac.integ);
+       r = value - q * 1000000000;
+       if (r >= 1000000000) {
+               ++q;
+               r -= 1000000000;
+       }
+       *rem = r;
+       return q;
+}
+
+#else /* !XNARCH_HAVE_NODIV_LLIMD */
+
+long long xnclock_ns_to_ticks(long long ns)
+{
+       return xnarch_llimd(ns, 1 << tsc_shift, tsc_scale);
+}
+
+#endif /* !XNARCH_HAVE_NODIV_LLIMD */
+
+xnsticks_t xnclock_ticks_to_ns(xnsticks_t ticks)
+{
+       return xnarch_llmulshft(ticks, tsc_scale, tsc_shift);
+}
+
+xnsticks_t xnclock_ticks_to_ns_rounded(xnsticks_t ticks)
+{
+       unsigned int shift = tsc_shift - 1;
+       return (xnarch_llmulshft(ticks, tsc_scale, shift) + 1) / 2;
+}
+
+#else  /* !XNARCH_HAVE_LLMULSHFT */
+
+xnsticks_t xnclock_ticks_to_ns(xnsticks_t ticks)
+{
+       return xnarch_llimd(ticks, 1000000000, clockfreq);
+}
+
+xnsticks_t xnclock_ticks_to_ns_rounded(xnsticks_t ticks)
+{
+       return (xnarch_llimd(ticks, 1000000000, clockfreq/2) + 1) / 2;
+}
+
+xnsticks_t xnclock_ns_to_ticks(xnsticks_t ns)
+{
+       return xnarch_llimd(ns, clockfreq, 1000000000);
+}
+#endif /* !XNARCH_HAVE_LLMULSHFT */
+
+#ifndef XNARCH_HAVE_NODIV_LLIMD
+unsigned long long xnclock_divrem_billion(unsigned long long value,
+                                         unsigned long *rem)
+{
+       return xnarch_ulldiv(value, 1000000000, rem);
+
+}
+#endif /* !XNARCH_HAVE_NODIV_LLIMD */
+
+EXPORT_SYMBOL_GPL(xnclock_ticks_to_ns);
+EXPORT_SYMBOL_GPL(xnclock_ticks_to_ns_rounded);
+EXPORT_SYMBOL_GPL(xnclock_ns_to_ticks);
+EXPORT_SYMBOL_GPL(xnclock_divrem_billion);
 
 /*!
  * \fn void xnclock_adjust(xnsticks_t delta)
@@ -76,7 +161,7 @@ EXPORT_SYMBOL_GPL(xnclock_get_host_time);
 
 xnticks_t xnclock_read_monotonic(void)
 {
-       return xnarch_tsc_to_ns(xnclock_read_raw());
+       return xnclock_ticks_to_ns(xnclock_read_raw());
 }
 EXPORT_SYMBOL_GPL(xnclock_read_monotonic);
 
@@ -211,4 +296,16 @@ struct xnclock nkclock = {
 };
 EXPORT_SYMBOL_GPL(nkclock);
 
+void __init xnclock_init(unsigned long long freq)
+{
+       clockfreq = freq;
+#ifdef XNARCH_HAVE_LLMULSHFT
+       xnarch_init_llmulshft(1000000000, freq, &tsc_scale, &tsc_shift);
+#ifdef XNARCH_HAVE_NODIV_LLIMD
+       xnarch_init_u32frac(&tsc_frac, 1 << tsc_shift, tsc_scale);
+       xnarch_init_u32frac(&bln_frac, 1, 1000000000);
+#endif
+#endif
+}
+
 /*@}*/
diff --git a/kernel/cobalt/init.c b/kernel/cobalt/init.c
index 149a79d..ac8a8ad 100644
--- a/kernel/cobalt/init.c
+++ b/kernel/cobalt/init.c
@@ -69,8 +69,6 @@ EXPORT_SYMBOL_GPL(__xnsys_global_ppd);
 #define boot_notice ""
 #endif
 
-void xnarch_init_timeconv(unsigned long long freq);
-
 static int __init mach_setup(void)
 {
        int ret, virq, __maybe_unused cpu;
@@ -135,7 +133,7 @@ static int __init mach_setup(void)
                          (ipipe_irq_handler_t)__xnpod_schedule_handler,
                          NULL, NULL);
 
-       xnarch_init_timeconv(xnarch_machdata.clock_freq);
+       xnclock_init(xnarch_machdata.clock_freq);
 
        return 0;
 
@@ -170,7 +168,7 @@ static int __init xenomai_init(void)
                goto cleanup_mach;
 
        nktimerlat = xnarch_timer_calibrate();
-       nklatency = xnarch_ns_to_tsc(xnarch_get_sched_latency()) + nktimerlat;
+       nklatency = xnclock_ns_to_ticks(xnarch_get_sched_latency()) + 
nktimerlat;
 
        ret = xnheap_init_mapped(&__xnsys_global_ppd.sem_heap,
                                 CONFIG_XENO_OPT_GLOBAL_SEM_HEAPSZ * 1024,
diff --git a/kernel/cobalt/pod.c b/kernel/cobalt/pod.c
index 8a1c2cf..153bf8d 100644
--- a/kernel/cobalt/pod.c
+++ b/kernel/cobalt/pod.c
@@ -2435,8 +2435,8 @@ static int lock_vfile_show(struct 
xnvfile_regular_iterator *it, void *data)
                             "  longest locked section: %llu ns\n"
                             "  spinning time: %llu ns\n"
                             "  section entry: %s:%d (%s)\n",
-                            xnarch_tsc_to_ns(lockinfo.lock_time),
-                            xnarch_tsc_to_ns(lockinfo.spin_time),
+                            xnclock_ticks_to_ns(lockinfo.lock_time),
+                            xnclock_ticks_to_ns(lockinfo.spin_time),
                             lockinfo.file, lockinfo.line, lockinfo.function);
        }
 
@@ -2480,7 +2480,7 @@ static struct xnvfile_regular lock_vfile = {
 
 static int latency_vfile_show(struct xnvfile_regular_iterator *it, void *data)
 {
-       xnvfile_printf(it, "%Lu\n", xnarch_tsc_to_ns(nklatency - nktimerlat));
+       xnvfile_printf(it, "%Lu\n", xnclock_ticks_to_ns(nklatency - 
nktimerlat));
 
        return 0;
 }
@@ -2494,7 +2494,7 @@ static ssize_t latency_vfile_store(struct xnvfile_input 
*input)
        if (ret < 0)
                return ret;
 
-       nklatency = xnarch_ns_to_tsc(val) + nktimerlat;
+       nklatency = xnclock_ns_to_ticks(val) + nktimerlat;
 
        return ret;
 }
diff --git a/kernel/cobalt/posix/clock.c b/kernel/cobalt/posix/clock.c
index 74123ce..112e342 100644
--- a/kernel/cobalt/posix/clock.c
+++ b/kernel/cobalt/posix/clock.c
@@ -112,7 +112,7 @@ static int do_clock_host_realtime(struct timespec *tp)
        nsec += (cycle_delta * mult) >> shift;
 
        /* Convert to the desired sec, usec representation */
-       tp->tv_sec += xnarch_divrem_billion(nsec, &rem);
+       tp->tv_sec += xnclock_divrem_billion(nsec, &rem);
        tp->tv_nsec = rem;
 
        return 0;
diff --git a/kernel/cobalt/posix/internal.h b/kernel/cobalt/posix/internal.h
index c2c36cf..6c20531 100644
--- a/kernel/cobalt/posix/internal.h
+++ b/kernel/cobalt/posix/internal.h
@@ -107,7 +107,7 @@ static inline struct cobalt_kqueues *cobalt_kqueues(int 
pshared)
 
 static inline void ns2ts(struct timespec *ts, xnticks_t nsecs)
 {
-       ts->tv_sec = xnarch_divrem_billion(nsecs, &ts->tv_nsec);
+       ts->tv_sec = xnclock_divrem_billion(nsecs, &ts->tv_nsec);
 }
 
 static inline xnticks_t ts2ns(const struct timespec *ts)
@@ -134,7 +134,7 @@ static inline void ticks2tv(struct timeval *tv, xnticks_t 
ticks)
 {
        unsigned long nsecs;
 
-       tv->tv_sec = xnarch_divrem_billion(ticks, &nsecs);
+       tv->tv_sec = xnclock_divrem_billion(ticks, &nsecs);
        tv->tv_usec = nsecs / 1000;
 }
 
diff --git a/kernel/cobalt/posix/thread.c b/kernel/cobalt/posix/thread.c
index d18e250..7ed80da 100644
--- a/kernel/cobalt/posix/thread.c
+++ b/kernel/cobalt/posix/thread.c
@@ -1109,7 +1109,7 @@ int cobalt_thread_stat(pid_t pid,
        xtime = xnthread_get_exectime(thread);
        if (xnthread_sched(thread)->curr == thread)
                xtime += xnstat_exectime_now() - 
xnthread_get_lastswitch(thread);
-       stat.xtime = xnarch_tsc_to_ns(xtime);
+       stat.xtime = xnclock_ticks_to_ns(xtime);
        stat.msw = xnstat_counter_get(&thread->stat.ssw);
        stat.csw = xnstat_counter_get(&thread->stat.csw);
        stat.xsc = xnstat_counter_get(&thread->stat.xsc);
diff --git a/kernel/cobalt/posix/timer.c b/kernel/cobalt/posix/timer.c
index 79895d2..29c4c4d 100644
--- a/kernel/cobalt/posix/timer.c
+++ b/kernel/cobalt/posix/timer.c
@@ -357,7 +357,7 @@ timer_settime(timer_t timerid, int flags,
                                        start += period;
                                } while ((xnsticks_t) (start - now) <= 0);
                        } else
-                               start = now + xnarch_tsc_to_ns(nklatency);
+                               start = now + xnclock_ticks_to_ns(nklatency);
                        xntimer_start(&timer->timerbase, start, period,
                                      clock_flag(flags, timer->clockid));
                }
diff --git a/kernel/cobalt/rtdm/drvlib.c b/kernel/cobalt/rtdm/drvlib.c
index 787ceac..d66cf2e 100644
--- a/kernel/cobalt/rtdm/drvlib.c
+++ b/kernel/cobalt/rtdm/drvlib.c
@@ -448,7 +448,7 @@ EXPORT_SYMBOL_GPL(rtdm_task_join_nrt);
  */
 void rtdm_task_busy_sleep(nanosecs_rel_t delay)
 {
-       xnticks_t wakeup = xnclock_read_raw() + xnarch_ns_to_tsc(delay);
+       xnticks_t wakeup = xnclock_read_raw() + xnclock_ns_to_ticks(delay);
 
        while ((xnsticks_t)(xnclock_read_raw() - wakeup) < 0)
                cpu_relax();
diff --git a/kernel/cobalt/sched.c b/kernel/cobalt/sched.c
index cf13376..09dfe83 100644
--- a/kernel/cobalt/sched.c
+++ b/kernel/cobalt/sched.c
@@ -908,9 +908,9 @@ static int vfile_schedacct_show(struct 
xnvfile_snapshot_iterator *it,
 
        xnvfile_printf(it, "%u %d %lu %lu %lu %lu %.8lx %Lu %Lu %Lu %s %s %d 
%Lu\n",
                       p->cpu, p->pid, p->ssw, p->csw, p->xsc, p->pf, p->state,
-                      xnarch_tsc_to_ns(p->account_period),
-                      xnarch_tsc_to_ns(p->exectime_period),
-                      xnarch_tsc_to_ns(p->exectime_total),
+                      xnclock_ticks_to_ns(p->account_period),
+                      xnclock_ticks_to_ns(p->exectime_period),
+                      xnclock_ticks_to_ns(p->exectime_total),
                       p->name,
                       p->sched_class->name,
                       p->cprio,
diff --git a/kernel/cobalt/shadow.c b/kernel/cobalt/shadow.c
index be68eb8..ca0d00f 100644
--- a/kernel/cobalt/shadow.c
+++ b/kernel/cobalt/shadow.c
@@ -1534,7 +1534,7 @@ static int xnshadow_sys_current_info(struct xnthread_info 
__user *u_info)
        info.relpoint = xntimer_get_date(&cur->ptimer);
        raw_exectime = xnthread_get_exectime(cur) +
                xnstat_exectime_now() - xnthread_get_lastswitch(cur);
-       info.exectime = xnarch_tsc_to_ns(raw_exectime);
+       info.exectime = xnclock_ticks_to_ns(raw_exectime);
        info.modeswitches = xnstat_counter_get(&cur->stat.ssw);
        info.ctxswitches = xnstat_counter_get(&cur->stat.csw);
        info.pagefaults = xnstat_counter_get(&cur->stat.pf);
diff --git a/kernel/cobalt/timer.c b/kernel/cobalt/timer.c
index c6e0f75..3183ace 100644
--- a/kernel/cobalt/timer.c
+++ b/kernel/cobalt/timer.c
@@ -206,7 +206,7 @@ void xntimer_adjust_all(xnsticks_t delta)
        xntimerq_t *q;
 
        INIT_LIST_HEAD(&adjq);
-       delta = xnarch_ns_to_tsc(delta);
+       delta = xnclock_ns_to_ticks(delta);
 
        for_each_online_cpu(cpu) {
                sched = xnpod_sched_slot(cpu);
@@ -295,14 +295,14 @@ int xntimer_start(xntimer_t *timer,
        case XN_RELATIVE:
                if ((xnsticks_t)value < 0)
                        return -ETIMEDOUT;
-               date = xnarch_ns_to_tsc(value) + now;
+               date = xnclock_ns_to_ticks(value) + now;
                break;
        case XN_REALTIME:
                timer->status |= XNTIMER_REALTIME;
                value -= xnclock_get_offset();
                /* fall through */
        default: /* XN_ABSOLUTE || XN_REALTIME */
-               date = xnarch_ns_to_tsc(value);
+               date = xnclock_ns_to_ticks(value);
                if ((xnsticks_t)(date - now) <= 0)
                        return -ETIMEDOUT;
                break;
@@ -312,7 +312,7 @@ int xntimer_start(xntimer_t *timer,
 
        timer->interval = XN_INFINITE;
        if (interval != XN_INFINITE) {
-               timer->interval = xnarch_ns_to_tsc(interval);
+               timer->interval = xnclock_ns_to_ticks(interval);
                timer->pexpect = date;
                timer->status |= XNTIMER_PERIODIC;
        }
@@ -392,7 +392,7 @@ xnticks_t xntimer_get_date(xntimer_t *timer)
        if (!xntimer_running_p(timer))
                return XN_INFINITE;
 
-       return xnarch_tsc_to_ns(xntimerh_date(&timer->aplink));
+       return xnclock_ticks_to_ns(xntimerh_date(&timer->aplink));
 }
 EXPORT_SYMBOL_GPL(xntimer_get_date);
 
@@ -431,7 +431,7 @@ xnticks_t xntimer_get_timeout(xntimer_t *timer)
        if (xntimerh_date(&timer->aplink) < tsc)
                return 1;       /* Will elapse shortly. */
 
-       return xnarch_tsc_to_ns(xntimerh_date(&timer->aplink) - tsc);
+       return xnclock_ticks_to_ns(xntimerh_date(&timer->aplink) - tsc);
 }
 EXPORT_SYMBOL_GPL(xntimer_get_timeout);
 
@@ -458,7 +458,7 @@ EXPORT_SYMBOL_GPL(xntimer_get_timeout);
  */
 xnticks_t xntimer_get_interval(xntimer_t *timer)
 {
-       return xnarch_tsc_to_ns_rounded(timer->interval);
+       return xnclock_ticks_to_ns_rounded(timer->interval);
 }
 EXPORT_SYMBOL_GPL(xntimer_get_interval);
 
@@ -541,7 +541,7 @@ void xntimer_tick(void)
                                 * the user to continue program
                                 * execution.
                                 */
-                               interval = xnarch_ns_to_tsc(250000000ULL);
+                               interval = xnclock_ns_to_ticks(250000000ULL);
                                goto requeue;
                        }
                } else {
@@ -819,7 +819,7 @@ char *xntimer_format_time(xnticks_t value, char *buf, 
size_t bufsz)
                return buf;
        }
 
-       s = xnarch_divrem_billion(value, &ns);
+       s = xnclock_divrem_billion(value, &ns);
        us = ns / 1000;
        ms = us / 1000;
        us %= 1000;
@@ -1069,7 +1069,7 @@ static int timer_vfile_show(struct 
xnvfile_regular_iterator *it, void *data)
 
        xnvfile_printf(it,
                       
"status=%s%s:setup=%Lu:clock=%Lu:timerdev=%s:clockdev=%s\n",
-                      tm_status, wd_status, xnarch_tsc_to_ns(nktimerlat),
+                      tm_status, wd_status, xnclock_ticks_to_ns(nktimerlat),
                       xnclock_read_raw(),
                       ipipe_timer_name(), ipipe_clock_name());
        return 0;
diff --git a/kernel/drivers/ipc/internal.h b/kernel/drivers/ipc/internal.h
index 3beb8b3..da7549f 100644
--- a/kernel/drivers/ipc/internal.h
+++ b/kernel/drivers/ipc/internal.h
@@ -93,7 +93,7 @@ static inline void rtipc_ns_to_timeval(struct timeval *tv, 
nanosecs_rel_t ns)
 {
        unsigned long nsecs;
 
-       tv->tv_sec = xnarch_divrem_billion(ns, &nsecs);
+       tv->tv_sec = xnclock_divrem_billion(ns, &nsecs);
        tv->tv_usec = nsecs / 1000;
 }
 
diff --git a/lib/cobalt/Makefile.am b/lib/cobalt/Makefile.am
index 0d4c34d..83a1819 100644
--- a/lib/cobalt/Makefile.am
+++ b/lib/cobalt/Makefile.am
@@ -30,6 +30,7 @@ libcobalt_la_SOURCES =                \
        semaphore.c             \
        sigshadow.c             \
        thread.c                \
+       ticks.c                 \
        timer.c                 \
        trace.c                 \
        wrappers.c
diff --git a/lib/cobalt/Makefile.in b/lib/cobalt/Makefile.in
index b39339e..9f86a47 100644
--- a/lib/cobalt/Makefile.in
+++ b/lib/cobalt/Makefile.in
@@ -108,8 +108,9 @@ am_libcobalt_la_OBJECTS = libcobalt_la-assert_context.lo \
        libcobalt_la-printf.lo libcobalt_la-rtdm.lo \
        libcobalt_la-select.lo libcobalt_la-sem_heap.lo \
        libcobalt_la-semaphore.lo libcobalt_la-sigshadow.lo \
-       libcobalt_la-thread.lo libcobalt_la-timer.lo \
-       libcobalt_la-trace.lo libcobalt_la-wrappers.lo
+       libcobalt_la-thread.lo libcobalt_la-ticks.lo \
+       libcobalt_la-timer.lo libcobalt_la-trace.lo \
+       libcobalt_la-wrappers.lo
 libcobalt_la_OBJECTS = $(am_libcobalt_la_OBJECTS)
 libcobalt_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -367,6 +368,7 @@ libcobalt_la_SOURCES = \
        semaphore.c             \
        sigshadow.c             \
        thread.c                \
+       ticks.c                 \
        timer.c                 \
        trace.c                 \
        wrappers.c
@@ -471,6 +473,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/libcobalt_la-semaphore.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/libcobalt_la-sigshadow.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/libcobalt_la-thread.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/libcobalt_la-ticks.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/libcobalt_la-timer.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/libcobalt_la-trace.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/libcobalt_la-wrappers.Plo@am__quote@
@@ -608,6 +611,13 @@ libcobalt_la-thread.lo: thread.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) 
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(libcobalt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libcobalt_la-thread.lo `test -f 'thread.c' || echo '$(srcdir)/'`thread.c
 
+libcobalt_la-ticks.lo: ticks.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) 
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(libcobalt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 
libcobalt_la-ticks.lo -MD -MP -MF $(DEPDIR)/libcobalt_la-ticks.Tpo -c -o 
libcobalt_la-ticks.lo `test -f 'ticks.c' || echo '$(srcdir)/'`ticks.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libcobalt_la-ticks.Tpo 
$(DEPDIR)/libcobalt_la-ticks.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='ticks.c' 
object='libcobalt_la-ticks.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) 
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(libcobalt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libcobalt_la-ticks.lo `test -f 'ticks.c' || echo '$(srcdir)/'`ticks.c
+
 libcobalt_la-timer.lo: timer.c
 @am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) 
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(libcobalt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 
libcobalt_la-timer.lo -MD -MP -MF $(DEPDIR)/libcobalt_la-timer.Tpo -c -o 
libcobalt_la-timer.lo `test -f 'timer.c' || echo '$(srcdir)/'`timer.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libcobalt_la-timer.Tpo 
$(DEPDIR)/libcobalt_la-timer.Plo
diff --git a/lib/cobalt/clock.c b/lib/cobalt/clock.c
index 85db928..366cdc3 100644
--- a/lib/cobalt/clock.c
+++ b/lib/cobalt/clock.c
@@ -23,9 +23,8 @@
 #include <errno.h>
 #include <pthread.h>           /* For pthread_setcanceltype. */
 #include <time.h>
-#include <asm/xenomai/arith.h>
-#include <asm-generic/xenomai/timeconv.h>
 #include <cobalt/uapi/time.h>
+#include <cobalt/ticks.h>
 #include <asm/sysdeps/syscall.h>
 #include <asm/sysdeps/tsc.h>
 #include "sem_heap.h"
@@ -76,7 +75,7 @@ static int __do_clock_host_realtime(struct timespec *ts, void 
*tzp)
        cycle_delta = (now - base) & mask;
        nsec += (cycle_delta * mult) >> shift;
 
-       ts->tv_sec += xnarch_divrem_billion(nsec, &rem);
+       ts->tv_sec += cobalt_divrem_billion(nsec, &rem);
        ts->tv_nsec = rem;
 
        return 0;
@@ -94,8 +93,8 @@ COBALT_IMPL(int, clock_gettime, (clockid_t clock_id, struct 
timespec *tp))
                break;
        case CLOCK_MONOTONIC:
        case CLOCK_MONOTONIC_RAW:
-               ns = xnarch_tsc_to_ns(__xn_rdtsc());
-               tp->tv_sec = xnarch_divrem_billion(ns, &rem);
+               ns = cobalt_ticks_to_ns(__xn_rdtsc());
+               tp->tv_sec = cobalt_divrem_billion(ns, &rem);
                tp->tv_nsec = rem;
                return 0;
        default:
diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c
index f2912bf..66c075d 100644
--- a/lib/cobalt/init.c
+++ b/lib/cobalt/init.c
@@ -28,9 +28,9 @@
 #include <asm-generic/xenomai/stack.h>
 #include <cobalt/uapi/sys/heap.h>
 #include <cobalt/uapi/rtdm/syscall.h>
+#include <cobalt/ticks.h>
 #include <asm/sysdeps/syscall.h>
 #include <rtdk.h>
-#include "kernel/cobalt/timeconv.h"
 #include "sem_heap.h"
 #include "internal.h"
 
@@ -126,7 +126,7 @@ static int bind_interface(void)
 
        main_tid = pthread_self();
 
-       xnarch_init_timeconv(sysinfo.clockfreq);
+       cobalt_ticks_init(sysinfo.clockfreq);
 
        return muxid;
 }
diff --git a/lib/cobalt/internal.c b/lib/cobalt/internal.c
index 3d0dfae..c9b1bdd 100644
--- a/lib/cobalt/internal.c
+++ b/lib/cobalt/internal.c
@@ -32,8 +32,6 @@
 #include "current.h"
 #include "internal.h"
 
-extern struct sigaction __cobalt_orig_sigdebug;
-
 void __cobalt_thread_harden(void)
 {
        unsigned long status = cobalt_get_current_mode();
diff --git a/lib/cobalt/internal.h b/lib/cobalt/internal.h
index adfe9ff..5cf4685 100644
--- a/lib/cobalt/internal.h
+++ b/lib/cobalt/internal.h
@@ -101,12 +101,16 @@ void cobalt_print_init(void);
 
 void cobalt_print_exit(void);
 
+void cobalt_ticks_init(unsigned long long freq);
+
 void cobalt_handle_sigdebug(int sig, siginfo_t *si, void *context);
 
 struct xnfeatinfo;
 
 void cobalt_check_features(struct xnfeatinfo *finfo);
 
+extern struct sigaction __cobalt_orig_sigdebug;
+
 extern int __cobalt_muxid;
 
 #endif /* _LIB_COBALT_INTERNAL_H */
diff --git a/kernel/cobalt/timeconv.h b/lib/cobalt/ticks.c
similarity index 74%
rename from kernel/cobalt/timeconv.h
rename to lib/cobalt/ticks.c
index 639f7b6..b683c35 100644
--- a/kernel/cobalt/timeconv.h
+++ b/lib/cobalt/ticks.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009 Philippe Gerum <r...@xenomai.org>.
+ * Copyright (C) 2013 Philippe Gerum <r...@xenomai.org>.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -15,42 +15,26 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
  */
-
-#ifndef _KERNEL_COBALT_TIMECONV_H
-#define _KERNEL_COBALT_TIMECONV_H
-
-#include <asm-generic/xenomai/timeconv.h>
 #include <asm/xenomai/arith.h>
+#include <cobalt/ticks.h>
 
 static unsigned long long clockfreq;
 
 #ifdef XNARCH_HAVE_LLMULSHFT
+
 static unsigned int tsc_scale, tsc_shift;
+
 #ifdef XNARCH_HAVE_NODIV_LLIMD
+
 static struct xnarch_u32frac tsc_frac;
 static struct xnarch_u32frac bln_frac;
-#endif
-#endif
-
-#ifdef XNARCH_HAVE_LLMULSHFT
-long long xnarch_tsc_to_ns(long long ticks)
-{
-       return xnarch_llmulshft(ticks, tsc_scale, tsc_shift);
-}
 
-long long xnarch_tsc_to_ns_rounded(long long ticks)
-{
-       unsigned int shift = tsc_shift - 1;
-       return (xnarch_llmulshft(ticks, tsc_scale, shift) + 1) / 2;
-}
-
-#ifdef XNARCH_HAVE_NODIV_LLIMD
-long long xnarch_ns_to_tsc(long long ns)
+long long cobalt_ns_to_ticks(long long ns)
 {
        return xnarch_nodiv_llimd(ns, tsc_frac.frac, tsc_frac.integ);
 }
 
-unsigned long long xnarch_divrem_billion(unsigned long long value,
+unsigned long long cobalt_divrem_billion(unsigned long long value,
                                         unsigned long *rem)
 {
        unsigned long long q;
@@ -65,33 +49,47 @@ unsigned long long xnarch_divrem_billion(unsigned long long 
value,
        *rem = r;
        return q;
 }
+
 #else /* !XNARCH_HAVE_NODIV_LLIMD */
-long long xnarch_ns_to_tsc(long long ns)
+
+long long cobalt_ns_to_ticks(long long ns)
 {
        return xnarch_llimd(ns, 1 << tsc_shift, tsc_scale);
 }
+
 #endif /* !XNARCH_HAVE_NODIV_LLIMD */
 
+xnsticks_t cobalt_ticks_to_ns(xnsticks_t ticks)
+{
+       return xnarch_llmulshft(ticks, tsc_scale, tsc_shift);
+}
+
+xnsticks_t cobalt_ticks_to_ns_rounded(xnsticks_t ticks)
+{
+       unsigned int shift = tsc_shift - 1;
+       return (xnarch_llmulshft(ticks, tsc_scale, shift) + 1) / 2;
+}
+
 #else  /* !XNARCH_HAVE_LLMULSHFT */
 
-long long xnarch_tsc_to_ns(long long ticks)
+xnsticks_t cobalt_ticks_to_ns(xnsticks_t ticks)
 {
        return xnarch_llimd(ticks, 1000000000, clockfreq);
 }
 
-long long xnarch_tsc_to_ns_rounded(long long ticks)
+xnsticks_t cobalt_ticks_to_ns_rounded(xnsticks_t ticks)
 {
        return (xnarch_llimd(ticks, 1000000000, clockfreq/2) + 1) / 2;
 }
 
-long long xnarch_ns_to_tsc(long long ns)
+xnsticks_t cobalt_ns_to_ticks(xnsticks_t ns)
 {
        return xnarch_llimd(ns, clockfreq, 1000000000);
 }
 #endif /* !XNARCH_HAVE_LLMULSHFT */
 
 #ifndef XNARCH_HAVE_NODIV_LLIMD
-unsigned long long xnarch_divrem_billion(unsigned long long value,
+unsigned long long cobalt_divrem_billion(unsigned long long value,
                                         unsigned long *rem)
 {
        return xnarch_ulldiv(value, 1000000000, rem);
@@ -99,7 +97,7 @@ unsigned long long xnarch_divrem_billion(unsigned long long 
value,
 }
 #endif /* !XNARCH_HAVE_NODIV_LLIMD */
 
-void xnarch_init_timeconv(unsigned long long freq)
+void cobalt_ticks_init(unsigned long long freq)
 {
        clockfreq = freq;
 #ifdef XNARCH_HAVE_LLMULSHFT
@@ -110,5 +108,3 @@ void xnarch_init_timeconv(unsigned long long freq)
 #endif
 #endif
 }
-
-#endif /* !_KERNEL_COBALT_TIMECONV_H */
diff --git a/lib/copperplate/clockobj.c b/lib/copperplate/clockobj.c
index a2ed56e..766d418 100644
--- a/lib/copperplate/clockobj.c
+++ b/lib/copperplate/clockobj.c
@@ -300,7 +300,7 @@ void clockobj_get_time(struct clockobj *clkobj,
        unsigned long long ns, tsc;
 
        tsc = __xn_rdtsc();
-       ns = xnarch_tsc_to_ns(tsc);
+       ns = cobalt_ticks_to_ns(tsc);
        if (clockobj_get_resolution(clkobj) > 1)
                ns /= clockobj_get_resolution(clkobj);
        *pticks = ns;
@@ -315,7 +315,7 @@ void clockobj_get_date(struct clockobj *clkobj, ticks_t 
*pticks)
 
        read_lock_nocancel(&clkobj->lock);
 
-       ns = xnarch_tsc_to_ns(__xn_rdtsc());
+       ns = cobalt_ticks_to_ns(__xn_rdtsc());
        /* Add offset to epoch. */
        ns += (unsigned long long)clkobj->offset.tv_sec * 1000000000ULL;
        ns += clkobj->offset.tv_nsec;


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to