Module: xenomai-gch
Branch: for-head
Commit: afe33c0708a69af1b148b75f0990be7ba5f14804
URL:    
http://git.xenomai.org/?p=xenomai-gch.git;a=commit;h=afe33c0708a69af1b148b75f0990be7ba5f14804

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Sun Dec 27 19:31:10 2009 +0100

nucleus: rename vdso symbols

struct xnvdso is the type,
nkvdso is the nucleus object,
vdso is the member in the xnsysinfo_t structure.

---

 include/asm-generic/syscall.h                 |    2 +-
 include/nucleus/xnvdso.h                      |   12 ++++++------
 ksrc/nucleus/shadow.c                         |   16 ++++++++--------
 src/testsuite/unit/Makefile.am                |   10 +++++-----
 src/testsuite/unit/{xnvdso.c => check-vdso.c} |   12 ++++++------
 5 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/include/asm-generic/syscall.h b/include/asm-generic/syscall.h
index 8f1ddc6..e8290a8 100644
--- a/include/asm-generic/syscall.h
+++ b/include/asm-generic/syscall.h
@@ -53,7 +53,7 @@
 typedef struct xnsysinfo {
        unsigned long long cpufreq;     /* CPU frequency */
        unsigned long tickval;          /* Tick duration (ns) */
-       unsigned long xnvdso_off;       /* Offset of xnvdso in the sem heap */
+       unsigned long vdso;             /* Offset of nkvdso in the sem heap */
 } xnsysinfo_t;
 
 #define SIGSHADOW  SIGWINCH
diff --git a/include/nucleus/xnvdso.h b/include/nucleus/xnvdso.h
index fbff8fa..0b51d94 100644
--- a/include/nucleus/xnvdso.h
+++ b/include/nucleus/xnvdso.h
@@ -42,19 +42,19 @@ struct xnvdso {
  * empty.
  */
 /*
-#define XNVDSO_FEAT_A  0x0000000000000001
-#define XNVDSO_FEAT_B  0x0000000000000002
-#define XNVDSO_FEAT_C  0x0000000000000004
+#define XNVDSO_FEAT_A  0x0000000000000001ULL
+#define XNVDSO_FEAT_B  0x0000000000000002ULL
+#define XNVDSO_FEAT_C  0x0000000000000004ULL
 #define XNVDSO_FEATURES        (XNVDSO_FEAT_A | XNVDSO_FEAT_B | XVDSO_FEAT_C)
 */
 
-#define XNVDSO_FEATURES 0x0000000000000000
+#define XNVDSO_FEATURES 0x0000000000000000ULL
 
-extern struct xnvdso *xnvdso;
+extern struct xnvdso *nkvdso;
 
 static inline int xnvdso_test_feature(unsigned long long feature)
 {
-       return testbits(xnvdso->features, feature);
+       return testbits(nkvdso->features, feature);
 }
 
 extern void xnheap_init_vdso(void);
diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
index bff7dc5..06f10f3 100644
--- a/ksrc/nucleus/shadow.c
+++ b/ksrc/nucleus/shadow.c
@@ -694,8 +694,8 @@ void xnshadow_clear_sig(xnthread_t *thread, unsigned muxid)
 }
 EXPORT_SYMBOL_GPL(xnshadow_clear_sig);
 
-struct xnvdso *xnvdso;
-EXPORT_SYMBOL_GPL(xnvdso);
+struct xnvdso *nkvdso;
+EXPORT_SYMBOL_GPL(nkvdso);
 
 /*
  * We re-use the global semaphore heap to provide a multi-purpose shared
@@ -703,13 +703,13 @@ EXPORT_SYMBOL_GPL(xnvdso);
  */
 void __init xnheap_init_vdso(void)
 {
-       xnvdso = (struct xnvdso *)xnheap_alloc(&__xnsys_global_ppd.sem_heap,
-                                                 sizeof(*xnvdso));
+       nkvdso = (struct xnvdso *)
+               xnheap_alloc(&__xnsys_global_ppd.sem_heap, sizeof(*nkvdso));
 
-       if (!xnvdso)
+       if (!nkvdso)
                xnpod_fatal("Xenomai: cannot allocate memory for xnvdso!\n");
 
-       xnvdso->features = XNVDSO_FEATURES;
+       nkvdso->features = XNVDSO_FEATURES;
 }
 
 static inline void handle_rt_signals(xnthread_t *thread,
@@ -1765,8 +1765,8 @@ static int xnshadow_sys_info(struct pt_regs *regs)
 
        info.cpufreq = xnarch_get_cpu_freq();
 
-       info.xnvdso_off =
-         xnheap_mapped_offset(&xnsys_ppd_get(1)->sem_heap, xnvdso);
+       info.vdso =
+               xnheap_mapped_offset(&xnsys_ppd_get(1)->sem_heap, nkvdso);
 
        return __xn_safe_copy_to_user((void __user *)infarg, &info, 
sizeof(info));
 }
diff --git a/src/testsuite/unit/Makefile.am b/src/testsuite/unit/Makefile.am
index c77cc54..65ce5d4 100644
--- a/src/testsuite/unit/Makefile.am
+++ b/src/testsuite/unit/Makefile.am
@@ -3,7 +3,7 @@ testdir = $(exec_prefix)/share/xenomai/testsuite/unit
 CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC)
 
 bin_PROGRAMS = arith wakeup-time mutex-torture-posix mutex-torture-native \
-               xnvdso
+               check-vdso
 
 arith_SOURCES = arith.c arith-noinline.c arith-noinline.h
 
@@ -54,15 +54,15 @@ mutex_torture_native_LDADD = \
        ../../skins/native/libnative.la \
        -lpthread -lm
 
-xnvdso_SOURCES = xnvdso.c
+check_vdso_SOURCES = check-vdso.c
 
-xnvdso_CPPFLAGS = \
+check_vdso_CPPFLAGS = \
        @XENO_USER_CFLAGS@ \
        -I$(top_srcdir)/include
 
-xnvdso_LDFLAGS = @XENO_USER_LDFLAGS@
+check_vdso_LDFLAGS = @XENO_USER_LDFLAGS@
 
-xnvdso_LDADD = \
+check_vdso_LDADD = \
        ../../skins/native/libnative.la \
        -lpthread -lm
 
diff --git a/src/testsuite/unit/xnvdso.c b/src/testsuite/unit/check-vdso.c
similarity index 75%
rename from src/testsuite/unit/xnvdso.c
rename to src/testsuite/unit/check-vdso.c
index 69305c2..250c6fa 100644
--- a/src/testsuite/unit/xnvdso.c
+++ b/src/testsuite/unit/check-vdso.c
@@ -14,7 +14,7 @@ int main(int argc, char **argv)
 {
        int err;
        xnsysinfo_t sysinfo;
-       struct xnvdso *xnvdso;
+       struct xnvdso *nkvdso;
        unsigned long long test_features;
 
        if (argc != 2) {
@@ -39,14 +39,14 @@ int main(int argc, char **argv)
 
        printf("Address of the global semaphore heap: 0x%lx\n",
               xeno_sem_heap[1]);
-       printf("Offset of xnvdso: %lu\n", sysinfo.xnvdso_off);
+       printf("Offset of xnvdso: %lu\n", sysinfo.vdso);
 
-       xnvdso = (struct xnvdso *)(xeno_sem_heap[1] + sysinfo.xnvdso_off);
-       printf("Contents of the features flag: %llu\n", xnvdso->features);
+       nkvdso = (struct xnvdso *)(xeno_sem_heap[1] + sysinfo.vdso);
+       printf("Contents of the features flag: %llu\n", nkvdso->features);
 
-       if (xnvdso->features == test_features)
+       if (nkvdso->features == test_features)
                return 0;
 
-       fprintf(stderr, "error: xnvdso->features != %llu\n", test_features);
+       fprintf(stderr, "error: nkvdso->features != %llu\n", test_features);
        return 1;
 }


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

Reply via email to