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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Sep  9 08:53:08 2014 +0200

lib/cobalt: vdso -> cobalt_vdso

---

 lib/cobalt/clock.c                         |    6 +++---
 lib/cobalt/umm.c                           |    4 ++--
 lib/cobalt/umm.h                           |    2 +-
 testsuite/clocktest/clocktest.c            |   28 ++++++++++++++--------------
 testsuite/smokey/vdso-access/vdso-access.c |    4 ++--
 5 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/lib/cobalt/clock.c b/lib/cobalt/clock.c
index 682c9cb..501cdec 100644
--- a/lib/cobalt/clock.c
+++ b/lib/cobalt/clock.c
@@ -116,10 +116,10 @@ static int __do_clock_host_realtime(struct timespec *ts)
        unsigned long rem;
        urwstate_t tmp;
 
-       if (!xnvdso_test_feature(vdso, XNVDSO_FEAT_HOST_REALTIME))
+       if (!xnvdso_test_feature(cobalt_vdso, XNVDSO_FEAT_HOST_REALTIME))
                return -1;
 
-       hostrt_data = &vdso->hostrt_data;
+       hostrt_data = &cobalt_vdso->hostrt_data;
 
        if (!hostrt_data->live)
                return -1;
@@ -193,7 +193,7 @@ COBALT_IMPL(int, clock_gettime, (clockid_t clock_id, struct 
timespec *tp))
                return 0;
        case CLOCK_REALTIME:
                ns = cobalt_ticks_to_ns(cobalt_read_tsc());
-               ns += vdso->wallclock_offset;
+               ns += cobalt_vdso->wallclock_offset;
                tp->tv_sec = cobalt_divrem_billion(ns, &rem);
                tp->tv_nsec = rem;
                return 0;
diff --git a/lib/cobalt/umm.c b/lib/cobalt/umm.c
index 2460e0c..7ae57f2 100644
--- a/lib/cobalt/umm.c
+++ b/lib/cobalt/umm.c
@@ -34,7 +34,7 @@
 #include "umm.h"
 #include "internal.h"
 
-struct xnvdso *vdso;
+struct xnvdso *cobalt_vdso;
 
 void *cobalt_umm_private = NULL;
 
@@ -110,7 +110,7 @@ static void init_vdso(void)
                exit(EXIT_FAILURE);
        }
 
-       vdso = (struct xnvdso *)(cobalt_umm_shared + sysinfo.vdso);
+       cobalt_vdso = (struct xnvdso *)(cobalt_umm_shared + sysinfo.vdso);
 }
 
 /*
diff --git a/lib/cobalt/umm.h b/lib/cobalt/umm.h
index 1b14106..e0e3cf8 100644
--- a/lib/cobalt/umm.h
+++ b/lib/cobalt/umm.h
@@ -22,6 +22,6 @@ void cobalt_init_umm(void);
 
 struct xnvdso;
 
-extern struct xnvdso *vdso;
+extern struct xnvdso *cobalt_vdso;
 
 #endif /* _LIB_COBALT_UMM_H */
diff --git a/testsuite/clocktest/clocktest.c b/testsuite/clocktest/clocktest.c
index 56260c5..ef19c95 100644
--- a/testsuite/clocktest/clocktest.c
+++ b/testsuite/clocktest/clocktest.c
@@ -34,7 +34,7 @@
 
 #include <xeno_config.h>
 
-extern struct xnvdso *vdso;
+extern struct xnvdso *cobalt_vdso;
 
 #ifndef HAVE_RECENT_SETAFFINITY
 #ifdef HAVE_OLD_SETAFFINITY
@@ -82,12 +82,12 @@ struct per_cpu_data {
 
 static void show_hostrt_diagnostics(void)
 {
-       if (!xnvdso_test_feature(vdso, XNVDSO_FEAT_HOST_REALTIME)) {
+       if (!xnvdso_test_feature(cobalt_vdso, XNVDSO_FEAT_HOST_REALTIME)) {
                printf("XNVDSO_FEAT_HOST_REALTIME not available\n");
                return;
        }
 
-       if (vdso->hostrt_data.live)
+       if (cobalt_vdso->hostrt_data.live)
                printf("hostrt data area is live\n");
        else {
                printf("hostrt data area is not live\n");
@@ -95,29 +95,29 @@ static void show_hostrt_diagnostics(void)
        }
 
        printf("Sequence counter : %u\n",
-              vdso->hostrt_data.lock.sequence);
+              cobalt_vdso->hostrt_data.lock.sequence);
        printf("wall_time_sec    : %lld\n",
-              (unsigned long long)vdso->hostrt_data.wall_time_sec);
-       printf("wall_time_nsec   : %u\n", vdso->hostrt_data.wall_time_nsec);
+              (unsigned long long)cobalt_vdso->hostrt_data.wall_time_sec);
+       printf("wall_time_nsec   : %u\n", 
cobalt_vdso->hostrt_data.wall_time_nsec);
        printf("wall_to_monotonic\n");
        printf("          tv_sec : %jd\n",
-              (intmax_t)vdso->hostrt_data.wall_to_monotonic.tv_sec);
+              (intmax_t)cobalt_vdso->hostrt_data.wall_to_monotonic.tv_sec);
        printf("         tv_nsec : %ld\n",
-              vdso->hostrt_data.wall_to_monotonic.tv_nsec);
-       printf("cycle_last       : %Lu\n", vdso->hostrt_data.cycle_last);
-       printf("mask             : 0x%Lx\n", vdso->hostrt_data.mask);
-       printf("mult             : %u\n", vdso->hostrt_data.mult);
-       printf("shift            : %u\n\n", vdso->hostrt_data.shift);
+              cobalt_vdso->hostrt_data.wall_to_monotonic.tv_nsec);
+       printf("cycle_last       : %Lu\n", cobalt_vdso->hostrt_data.cycle_last);
+       printf("mask             : 0x%Lx\n", cobalt_vdso->hostrt_data.mask);
+       printf("mult             : %u\n", cobalt_vdso->hostrt_data.mult);
+       printf("shift            : %u\n\n", cobalt_vdso->hostrt_data.shift);
 }
 
 static void show_realtime_offset(void)
 {
-       if (!xnvdso_test_feature(vdso, XNVDSO_FEAT_HOST_REALTIME)) {
+       if (!xnvdso_test_feature(cobalt_vdso, XNVDSO_FEAT_HOST_REALTIME)) {
                printf("XNVDSO_FEAT_WALLCLOCK_OFFSET not available\n");
                return;
        }
 
-       printf("Wallclock offset : %llu\n", vdso->wallclock_offset);
+       printf("Wallclock offset : %llu\n", cobalt_vdso->wallclock_offset);
 }
 
 static inline uint64_t read_clock(clockid_t clock_id)
diff --git a/testsuite/smokey/vdso-access/vdso-access.c 
b/testsuite/smokey/vdso-access/vdso-access.c
index 793fa5b..04f4f45 100644
--- a/testsuite/smokey/vdso-access/vdso-access.c
+++ b/testsuite/smokey/vdso-access/vdso-access.c
@@ -15,7 +15,7 @@ smokey_test_plugin(vdso_access,
 
 extern void *cobalt_umm_shared;
 
-extern struct xnvdso *vdso;
+extern struct xnvdso *cobalt_vdso;
 
 int run_vdso_access(struct smokey_test *t, int argc, char *const argv[])
 {
@@ -24,7 +24,7 @@ int run_vdso_access(struct smokey_test *t, int argc, char 
*const argv[])
                return 1;
        }
 
-       printf("VDSO: features detected: %llx\n", vdso->features);
+       printf("VDSO: features detected: %llx\n", cobalt_vdso->features);
 
        return 0;
 }


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

Reply via email to