Module: xenomai-head
Branch: master
Commit: 02305a6b15855223f9e58b9fa7c36790e94f0a27
URL:    
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=02305a6b15855223f9e58b9fa7c36790e94f0a27

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Sep 16 16:55:06 2009 +0200

timeconv: time converters must have weak linkage

Multiple libraries defining those converters may be linked against a
single executable, so tag those routines with a weak attribute.

---

 include/asm-generic/bits/timeconv.h |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/include/asm-generic/bits/timeconv.h 
b/include/asm-generic/bits/timeconv.h
index 4b8ecf1..fde8e5d 100644
--- a/include/asm-generic/bits/timeconv.h
+++ b/include/asm-generic/bits/timeconv.h
@@ -32,21 +32,24 @@ static rthal_u32frac_t bln_frac;
 #endif
 
 #ifdef XNARCH_HAVE_LLMULSHFT
+__attribute__ ((weak))
 long long xnarch_tsc_to_ns(long long ticks)
 {
        return xnarch_llmulshft(ticks, tsc_scale, tsc_shift);
 }
+__attribute__ ((weak))
 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
+__attribute__ ((weak))
 long long xnarch_ns_to_tsc(long long ns)
 {
        return xnarch_nodiv_llimd(ns, tsc_frac.frac, tsc_frac.integ);
 }
+__attribute__ ((weak))
 unsigned long long xnarch_divrem_billion(unsigned long long value,
                                         unsigned long *rem)
 {
@@ -63,20 +66,24 @@ unsigned long long xnarch_divrem_billion(unsigned long long 
value,
        return q;
 }
 #else /* !XNARCH_HAVE_NODIV_LLIMD */
+__attribute__ ((weak))
 long long xnarch_ns_to_tsc(long long ns)
 {
        return xnarch_llimd(ns, 1 << tsc_shift, tsc_scale);
 }
 #endif /* !XNARCH_HAVE_NODIV_LLIMD */
 #else  /* !XNARCH_HAVE_LLMULSHFT */
+__attribute__ ((weak))
 long long xnarch_tsc_to_ns(long long ticks)
 {
        return xnarch_llimd(ticks, 1000000000, clockfreq);
 }
+__attribute__ ((weak))
 long long xnarch_tsc_to_ns_rounded(long long ticks)
 {
        return (xnarch_llimd(ticks, 1000000000, clockfreq/2) + 1) / 2;
 }
+__attribute__ ((weak))
 long long xnarch_ns_to_tsc(long long ns)
 {
        return xnarch_llimd(ns, clockfreq, 1000000000);
@@ -84,6 +91,7 @@ long long xnarch_ns_to_tsc(long long ns)
 #endif /* !XNARCH_HAVE_LLMULSHFT */
 
 #ifndef XNARCH_HAVE_NODIV_LLIMD
+__attribute__ ((weak))
 unsigned long long xnarch_divrem_billion(unsigned long long value,
                                         unsigned long *rem)
 {


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to