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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Feb 19 16:40:06 2014 +0100

cobalt/posix: rename shadow descriptors unambiguously

---

 include/cobalt/uapi/cond.h  |    2 +-
 include/cobalt/uapi/mutex.h |    2 +-
 include/cobalt/uapi/sem.h   |    2 +-
 kernel/cobalt/posix/cond.c  |   22 +++++++++++-----------
 kernel/cobalt/posix/cond.h  |   12 ++++++------
 kernel/cobalt/posix/mutex.c |   20 ++++++++++----------
 kernel/cobalt/posix/mutex.h |   14 +++++++-------
 kernel/cobalt/posix/nsem.c  |   14 +++++++-------
 kernel/cobalt/posix/sem.c   |   30 +++++++++++++++---------------
 kernel/cobalt/posix/sem.h   |   26 +++++++++++++-------------
 lib/cobalt/cond.c           |   24 ++++++++++++------------
 lib/cobalt/init.c           |   12 ++++++------
 lib/cobalt/internal.c       |    2 +-
 lib/cobalt/internal.h       |    4 ++--
 lib/cobalt/mutex.c          |   12 ++++++------
 lib/cobalt/semaphore.c      |   22 +++++++++++-----------
 16 files changed, 110 insertions(+), 110 deletions(-)

diff --git a/include/cobalt/uapi/cond.h b/include/cobalt/uapi/cond.h
index 0c6157a..60e1ab4 100644
--- a/include/cobalt/uapi/cond.h
+++ b/include/cobalt/uapi/cond.h
@@ -24,7 +24,7 @@
 
 union cobalt_cond_union {
        pthread_cond_t native_cond;
-       struct __shadow_cond {
+       struct cobalt_cond_shadow {
                unsigned int magic;
                struct cobalt_condattr attr;
                xnhandle_t handle;
diff --git a/include/cobalt/uapi/mutex.h b/include/cobalt/uapi/mutex.h
index 88c95e7..1294ed0 100644
--- a/include/cobalt/uapi/mutex.h
+++ b/include/cobalt/uapi/mutex.h
@@ -29,7 +29,7 @@ struct mutex_dat {
 
 union cobalt_mutex_union {
        pthread_mutex_t native_mutex;
-       struct __shadow_mutex {
+       struct cobalt_mutex_shadow {
                unsigned int magic;
                unsigned int lockcnt;
                xnhandle_t handle;
diff --git a/include/cobalt/uapi/sem.h b/include/cobalt/uapi/sem.h
index 69fc989..dcd6388 100644
--- a/include/cobalt/uapi/sem.h
+++ b/include/cobalt/uapi/sem.h
@@ -32,7 +32,7 @@ struct sem_dat {
 
 union cobalt_sem_union {
        sem_t native_sem;
-       struct __shadow_sem {
+       struct cobalt_sem_shadow {
                unsigned int magic;
                int datp_offset;
                xnhandle_t handle;
diff --git a/kernel/cobalt/posix/cond.c b/kernel/cobalt/posix/cond.c
index 957a3ae..9051f2a 100644
--- a/kernel/cobalt/posix/cond.c
+++ b/kernel/cobalt/posix/cond.c
@@ -104,7 +104,7 @@ cond_destroy_internal(xnhandle_t handle, struct 
cobalt_kqueues *q)
  *
  */
 static inline int
-pthread_cond_init(struct __shadow_cond *cnd, const pthread_condattr_t *attr)
+pthread_cond_init(struct cobalt_cond_shadow *cnd, const pthread_condattr_t 
*attr)
 {
        int synch_flags = XNSYNCH_PRIO | XNSYNCH_NOPIP, err;
        struct cobalt_cond *cond, *old_cond;
@@ -214,7 +214,7 @@ do_init:
  * Specification.</a>
  *
  */
-static inline int pthread_cond_destroy(struct __shadow_cond *cnd)
+static inline int pthread_cond_destroy(struct cobalt_cond_shadow *cnd)
 {
        struct cobalt_cond *cond;
        int pshared;
@@ -227,7 +227,7 @@ static inline int pthread_cond_destroy(struct __shadow_cond 
*cnd)
                return -EINVAL;
        }
        
-       if (!cobalt_obj_active(cnd, COBALT_COND_MAGIC, struct __shadow_cond)
+       if (!cobalt_obj_active(cnd, COBALT_COND_MAGIC, struct 
cobalt_cond_shadow)
            || !cobalt_obj_active(cond, COBALT_COND_MAGIC, struct cobalt_cond)) 
{
                xnlock_put_irqrestore(&nklock, s);
                return -EINVAL;
@@ -357,11 +357,11 @@ unlock_and_return:
        return err;
 }
 
-int cobalt_cond_init(struct __shadow_cond __user *u_cnd,
+int cobalt_cond_init(struct cobalt_cond_shadow __user *u_cnd,
                     const pthread_condattr_t __user *u_attr)
 {
        pthread_condattr_t locattr, *attr;
-       struct __shadow_cond cnd;
+       struct cobalt_cond_shadow cnd;
        int err;
 
        if (__xn_safe_copy_from_user(&cnd, u_cnd, sizeof(cnd)))
@@ -384,9 +384,9 @@ int cobalt_cond_init(struct __shadow_cond __user *u_cnd,
        return __xn_safe_copy_to_user(u_cnd, &cnd, sizeof(*u_cnd));
 }
 
-int cobalt_cond_destroy(struct __shadow_cond __user *u_cnd)
+int cobalt_cond_destroy(struct cobalt_cond_shadow __user *u_cnd)
 {
-       struct __shadow_cond cnd;
+       struct cobalt_cond_shadow cnd;
        int err;
 
        if (__xn_safe_copy_from_user(&cnd, u_cnd, sizeof(cnd)))
@@ -404,8 +404,8 @@ struct us_cond_data {
 };
 
 /* pthread_cond_wait_prologue(cond, mutex, count_ptr, timed, timeout) */
-int cobalt_cond_wait_prologue(struct __shadow_cond __user *u_cnd,
-                             struct __shadow_mutex __user *u_mx,
+int cobalt_cond_wait_prologue(struct cobalt_cond_shadow __user *u_cnd,
+                             struct cobalt_mutex_shadow __user *u_mx,
                              int *u_err,
                              unsigned int timed,
                              struct timespec __user *u_ts)
@@ -470,8 +470,8 @@ int cobalt_cond_wait_prologue(struct __shadow_cond __user 
*u_cnd,
        return err == 0 ? perr : err;
 }
 
-int cobalt_cond_wait_epilogue(struct __shadow_cond __user *u_cnd,
-                             struct __shadow_mutex __user *u_mx)
+int cobalt_cond_wait_epilogue(struct cobalt_cond_shadow __user *u_cnd,
+                             struct cobalt_mutex_shadow __user *u_mx)
 {
        xnthread_t *cur = xnshadow_current();
        struct cobalt_cond *cnd;
diff --git a/kernel/cobalt/posix/cond.h b/kernel/cobalt/posix/cond.h
index 84946df..735ab25 100644
--- a/kernel/cobalt/posix/cond.h
+++ b/kernel/cobalt/posix/cond.h
@@ -60,19 +60,19 @@ int cobalt_condattr_getpshared(const pthread_condattr_t 
__user *u_attr,
 
 int cobalt_condattr_setpshared(pthread_condattr_t __user *u_attr, int pshared);
 
-int cobalt_cond_init(struct __shadow_cond __user *u_cnd,
+int cobalt_cond_init(struct cobalt_cond_shadow __user *u_cnd,
                     const pthread_condattr_t __user *u_attr);
 
-int cobalt_cond_destroy(struct __shadow_cond __user *u_cnd);
+int cobalt_cond_destroy(struct cobalt_cond_shadow __user *u_cnd);
 
-int cobalt_cond_wait_prologue(struct __shadow_cond __user *u_cnd,
-                             struct __shadow_mutex __user *u_mx,
+int cobalt_cond_wait_prologue(struct cobalt_cond_shadow __user *u_cnd,
+                             struct cobalt_mutex_shadow __user *u_mx,
                              int *u_err,
                              unsigned int timed,
                              struct timespec __user *u_ts);
 
-int cobalt_cond_wait_epilogue(struct __shadow_cond __user *u_cnd,
-                             struct __shadow_mutex __user *u_mx);
+int cobalt_cond_wait_epilogue(struct cobalt_cond_shadow __user *u_cnd,
+                             struct cobalt_mutex_shadow __user *u_mx);
 
 void cobalt_condq_cleanup(struct cobalt_kqueues *q);
 
diff --git a/kernel/cobalt/posix/mutex.c b/kernel/cobalt/posix/mutex.c
index baab802..9c66a3c 100644
--- a/kernel/cobalt/posix/mutex.c
+++ b/kernel/cobalt/posix/mutex.c
@@ -53,7 +53,7 @@
 #include "cond.h"
 #include "clock.h"
 
-static int cobalt_mutex_init_inner(struct __shadow_mutex *shadow,
+static int cobalt_mutex_init_inner(struct cobalt_mutex_shadow *shadow,
                                   struct cobalt_mutex *mutex,
                                   struct mutex_dat *datp,
                                   const pthread_mutexattr_t *attr)
@@ -252,7 +252,7 @@ int cobalt_mutex_timedlock_break(struct cobalt_mutex *mutex,
        return ret;
 }
 
-int cobalt_mutex_check_init(struct __shadow_mutex __user *u_mx)
+int cobalt_mutex_check_init(struct cobalt_mutex_shadow __user *u_mx)
 {
        struct cobalt_mutex *mutex;
        xnhandle_t handle;
@@ -273,13 +273,13 @@ int cobalt_mutex_check_init(struct __shadow_mutex __user 
*u_mx)
        return err;
 }
 
-int cobalt_mutex_init(struct __shadow_mutex __user *u_mx,
+int cobalt_mutex_init(struct cobalt_mutex_shadow __user *u_mx,
                      const pthread_mutexattr_t __user *u_attr)
 {
        const pthread_mutexattr_t *attr;
        pthread_mutexattr_t locattr;
        struct cobalt_mutex *mutex;
-       struct __shadow_mutex mx;
+       struct cobalt_mutex_shadow mx;
        struct mutex_dat *datp;
        int err;
 
@@ -316,10 +316,10 @@ int cobalt_mutex_init(struct __shadow_mutex __user *u_mx,
        return __xn_safe_copy_to_user(u_mx, &mx, sizeof(*u_mx));
 }
 
-int cobalt_mutex_destroy(struct __shadow_mutex __user *u_mx)
+int cobalt_mutex_destroy(struct cobalt_mutex_shadow __user *u_mx)
 {
        struct cobalt_mutex *mutex;
-       struct __shadow_mutex mx;
+       struct cobalt_mutex_shadow mx;
        spl_t s;
        int err;
 
@@ -357,7 +357,7 @@ int cobalt_mutex_destroy(struct __shadow_mutex __user *u_mx)
        return __xn_safe_copy_to_user(u_mx, &mx, sizeof(*u_mx));
 }
 
-int cobalt_mutex_trylock(struct __shadow_mutex __user *u_mx)
+int cobalt_mutex_trylock(struct cobalt_mutex_shadow __user *u_mx)
 {
        xnthread_t *cur = xnsched_current_thread();
        struct cobalt_mutex *mutex;
@@ -398,7 +398,7 @@ int cobalt_mutex_trylock(struct __shadow_mutex __user *u_mx)
        return err;
 }
 
-int cobalt_mutex_lock(struct __shadow_mutex __user *u_mx)
+int cobalt_mutex_lock(struct cobalt_mutex_shadow __user *u_mx)
 {
        xnhandle_t handle;
        spl_t s;
@@ -413,7 +413,7 @@ int cobalt_mutex_lock(struct __shadow_mutex __user *u_mx)
        return err;
 }
 
-int cobalt_mutex_timedlock(struct __shadow_mutex __user *u_mx,
+int cobalt_mutex_timedlock(struct cobalt_mutex_shadow __user *u_mx,
                           const struct timespec __user *u_ts)
 {
        xnhandle_t handle;
@@ -429,7 +429,7 @@ int cobalt_mutex_timedlock(struct __shadow_mutex __user 
*u_mx,
        return err;
 }
 
-int cobalt_mutex_unlock(struct __shadow_mutex __user *u_mx)
+int cobalt_mutex_unlock(struct cobalt_mutex_shadow __user *u_mx)
 {
        struct cobalt_mutex *mutex;
        xnhandle_t handle;
diff --git a/kernel/cobalt/posix/mutex.h b/kernel/cobalt/posix/mutex.h
index 1d2fe43..0fc29e6 100644
--- a/kernel/cobalt/posix/mutex.h
+++ b/kernel/cobalt/posix/mutex.h
@@ -59,21 +59,21 @@ int cobalt_mutexattr_getpshared(const pthread_mutexattr_t 
__user *u_attr,
 int cobalt_mutexattr_setpshared(pthread_mutexattr_t __user *u_attr,
                                int pshared);
 
-int cobalt_mutex_check_init(struct __shadow_mutex __user *u_mx);
+int cobalt_mutex_check_init(struct cobalt_mutex_shadow __user *u_mx);
 
-int cobalt_mutex_init(struct __shadow_mutex __user *u_mx,
+int cobalt_mutex_init(struct cobalt_mutex_shadow __user *u_mx,
                      const pthread_mutexattr_t __user *u_attr);
 
-int cobalt_mutex_destroy(struct __shadow_mutex __user *u_mx);
+int cobalt_mutex_destroy(struct cobalt_mutex_shadow __user *u_mx);
 
-int cobalt_mutex_trylock(struct __shadow_mutex __user *u_mx);
+int cobalt_mutex_trylock(struct cobalt_mutex_shadow __user *u_mx);
 
-int cobalt_mutex_lock(struct __shadow_mutex __user *u_mx);
+int cobalt_mutex_lock(struct cobalt_mutex_shadow __user *u_mx);
 
-int cobalt_mutex_timedlock(struct __shadow_mutex __user *u_mx,
+int cobalt_mutex_timedlock(struct cobalt_mutex_shadow __user *u_mx,
                           const struct timespec __user *u_ts);
 
-int cobalt_mutex_unlock(struct __shadow_mutex __user *u_mx);
+int cobalt_mutex_unlock(struct cobalt_mutex_shadow __user *u_mx);
 
 int cobalt_mutex_acquire_unchecked(struct xnthread *cur,
                                   struct cobalt_mutex *mutex,
diff --git a/kernel/cobalt/posix/nsem.c b/kernel/cobalt/posix/nsem.c
index 5d679cc..75dbec3 100644
--- a/kernel/cobalt/posix/nsem.c
+++ b/kernel/cobalt/posix/nsem.c
@@ -29,7 +29,7 @@ DEFINE_XNLOCK(nsem_lock);
 
 struct nsem {
        struct cobalt_sem *sem;
-       struct __shadow_sem __user *usem;
+       struct cobalt_sem_shadow __user *usem;
        unsigned refs;
        struct xnid id;
 };
@@ -45,11 +45,11 @@ static struct nsem *nsem_search(struct cobalt_process *cc, 
xnhandle_t handle)
        return container_of(i, struct nsem, id);
 }
 
-static struct __shadow_sem __user *
-nsem_open(struct cobalt_process *cc, struct __shadow_sem __user *ushadow, 
+static struct cobalt_sem_shadow __user *
+nsem_open(struct cobalt_process *cc, struct cobalt_sem_shadow __user *ushadow, 
        const char *name, int oflags, mode_t mode, unsigned value)
 {
-       struct __shadow_sem shadow;
+       struct cobalt_sem_shadow shadow;
        struct cobalt_sem *sem;
        struct nsem *u, *v;
        xnhandle_t handle;
@@ -182,11 +182,11 @@ void cobalt_nsem_unlink_inner(xnhandle_t handle)
                xnregistry_unlink(xnregistry_key(handle));
 }
 
-int cobalt_sem_open(struct __shadow_sem __user *__user *u_addr,
+int cobalt_sem_open(struct cobalt_sem_shadow __user *__user *u_addr,
                const char __user *u_name,
                int oflags, mode_t mode, unsigned value)
 {
-       struct __shadow_sem __user *usm;
+       struct cobalt_sem_shadow __user *usm;
        struct cobalt_process *cc;
        char name[COBALT_MAXNAME + 1];
        long len;
@@ -214,7 +214,7 @@ int cobalt_sem_open(struct __shadow_sem __user *__user 
*u_addr,
        return 0;
 }
 
-int cobalt_sem_close(struct __shadow_sem __user *usm)
+int cobalt_sem_close(struct cobalt_sem_shadow __user *usm)
 {
        struct cobalt_process *cc;
        xnhandle_t handle;
diff --git a/kernel/cobalt/posix/sem.c b/kernel/cobalt/posix/sem.c
index 53a3b67..c1b780e 100644
--- a/kernel/cobalt/posix/sem.c
+++ b/kernel/cobalt/posix/sem.c
@@ -84,7 +84,7 @@ int cobalt_sem_destroy_inner(xnhandle_t handle)
 }
 
 struct cobalt_sem *
-cobalt_sem_init_inner(const char *name, struct __shadow_sem *sm, 
+cobalt_sem_init_inner(const char *name, struct cobalt_sem_shadow *sm, 
                      int flags, unsigned int value)
 {
        struct cobalt_sem *sem, *osem;
@@ -211,7 +211,7 @@ cobalt_sem_init_inner(const char *name, struct __shadow_sem 
*sm,
  * Specification.</a>
  *
  */
-static int sem_destroy(struct __shadow_sem *sm)
+static int sem_destroy(struct cobalt_sem_shadow *sm)
 {
        struct cobalt_sem *sem;
        int warn, ret;
@@ -656,9 +656,9 @@ static int sem_getvalue(xnhandle_t handle, int *value)
        return 0;
 }
 
-int cobalt_sem_init(struct __shadow_sem __user *u_sem, int pshared, unsigned 
value)
+int cobalt_sem_init(struct cobalt_sem_shadow __user *u_sem, int pshared, 
unsigned value)
 {
-       struct __shadow_sem sm;
+       struct cobalt_sem_shadow sm;
        struct cobalt_sem *sem;
 
        if (__xn_safe_copy_from_user(&sm, u_sem, sizeof(sm)))
@@ -671,7 +671,7 @@ int cobalt_sem_init(struct __shadow_sem __user *u_sem, int 
pshared, unsigned val
        return __xn_safe_copy_to_user(u_sem, &sm, sizeof(*u_sem));
 }
 
-int cobalt_sem_post(struct __shadow_sem __user *u_sem)
+int cobalt_sem_post(struct cobalt_sem_shadow __user *u_sem)
 {
        xnhandle_t handle;
 
@@ -680,7 +680,7 @@ int cobalt_sem_post(struct __shadow_sem __user *u_sem)
        return sem_post(handle);
 }
 
-int cobalt_sem_wait(struct __shadow_sem __user *u_sem)
+int cobalt_sem_wait(struct cobalt_sem_shadow __user *u_sem)
 {
        xnhandle_t handle;
 
@@ -689,7 +689,7 @@ int cobalt_sem_wait(struct __shadow_sem __user *u_sem)
        return sem_wait(handle);
 }
 
-int cobalt_sem_timedwait(struct __shadow_sem __user *u_sem,
+int cobalt_sem_timedwait(struct cobalt_sem_shadow __user *u_sem,
                         struct timespec __user *u_ts)
 {
        xnhandle_t handle;
@@ -699,7 +699,7 @@ int cobalt_sem_timedwait(struct __shadow_sem __user *u_sem,
        return sem_timedwait(handle, u_ts);
 }
 
-int cobalt_sem_trywait(struct __shadow_sem __user *u_sem)
+int cobalt_sem_trywait(struct cobalt_sem_shadow __user *u_sem)
 {
        xnhandle_t handle;
 
@@ -708,7 +708,7 @@ int cobalt_sem_trywait(struct __shadow_sem __user *u_sem)
        return sem_trywait(handle);
 }
 
-int cobalt_sem_getvalue(struct __shadow_sem __user *u_sem, int __user *u_sval)
+int cobalt_sem_getvalue(struct cobalt_sem_shadow __user *u_sem, int __user 
*u_sval)
 {
        xnhandle_t handle;
        int err, sval;
@@ -722,9 +722,9 @@ int cobalt_sem_getvalue(struct __shadow_sem __user *u_sem, 
int __user *u_sval)
        return __xn_safe_copy_to_user(u_sval, &sval, sizeof(sval));
 }
 
-int cobalt_sem_destroy(struct __shadow_sem __user *u_sem)
+int cobalt_sem_destroy(struct cobalt_sem_shadow __user *u_sem)
 {
-       struct __shadow_sem sm;
+       struct cobalt_sem_shadow sm;
        int err;
 
        if (__xn_safe_copy_from_user(&sm, u_sem, sizeof(sm)))
@@ -737,10 +737,10 @@ int cobalt_sem_destroy(struct __shadow_sem __user *u_sem)
        return __xn_safe_copy_to_user(u_sem, &sm, sizeof(*u_sem)) ?: err;
 }
 
-int cobalt_sem_init_np(struct __shadow_sem __user *u_sem,
+int cobalt_sem_init_np(struct cobalt_sem_shadow __user *u_sem,
                       int flags, unsigned value)
 {
-       struct __shadow_sem sm;
+       struct cobalt_sem_shadow sm;
        struct cobalt_sem *sem;
 
        if (__xn_safe_copy_from_user(&sm, u_sem, sizeof(sm)))
@@ -757,7 +757,7 @@ int cobalt_sem_init_np(struct __shadow_sem __user *u_sem,
        return __xn_safe_copy_to_user(u_sem, &sm, sizeof(*u_sem));
 }
 
-int cobalt_sem_broadcast_np(struct __shadow_sem __user *u_sem)
+int cobalt_sem_broadcast_np(struct cobalt_sem_shadow __user *u_sem)
 {
        struct cobalt_sem *sm;
        xnhandle_t handle;
@@ -774,7 +774,7 @@ int cobalt_sem_broadcast_np(struct __shadow_sem __user 
*u_sem)
        return err;
 }
 
-int cobalt_sem_inquire(struct __shadow_sem __user *u_sem,
+int cobalt_sem_inquire(struct cobalt_sem_shadow __user *u_sem,
                       struct cobalt_sem_info __user *u_info,
                       pid_t __user *u_waitlist,
                       size_t waitsz)
diff --git a/kernel/cobalt/posix/sem.h b/kernel/cobalt/posix/sem.h
index ecf3894..09a2e48 100644
--- a/kernel/cobalt/posix/sem.h
+++ b/kernel/cobalt/posix/sem.h
@@ -58,7 +58,7 @@ typedef struct
 #define SEM_FAILED    NULL
 
 struct cobalt_sem * 
-cobalt_sem_init_inner(const char *name, struct __shadow_sem *sem, 
+cobalt_sem_init_inner(const char *name, struct cobalt_sem_shadow *sem, 
                int flags, unsigned value);
 
 int cobalt_sem_destroy_inner(xnhandle_t handle);
@@ -67,37 +67,37 @@ void cobalt_nsem_unlink_inner(xnhandle_t handle);
 
 void cobalt_sem_usems_cleanup(struct cobalt_process *cc);
 
-int cobalt_sem_init(struct __shadow_sem __user *u_sem,
+int cobalt_sem_init(struct cobalt_sem_shadow __user *u_sem,
                    int pshared, unsigned value);
 
-int cobalt_sem_post(struct __shadow_sem __user *u_sem);
+int cobalt_sem_post(struct cobalt_sem_shadow __user *u_sem);
 
-int cobalt_sem_wait(struct __shadow_sem __user *u_sem);
+int cobalt_sem_wait(struct cobalt_sem_shadow __user *u_sem);
 
-int cobalt_sem_timedwait(struct __shadow_sem __user *u_sem,
+int cobalt_sem_timedwait(struct cobalt_sem_shadow __user *u_sem,
                         struct timespec __user *u_ts);
 
-int cobalt_sem_trywait(struct __shadow_sem __user *u_sem);
+int cobalt_sem_trywait(struct cobalt_sem_shadow __user *u_sem);
 
-int cobalt_sem_getvalue(struct __shadow_sem __user *u_sem,
+int cobalt_sem_getvalue(struct cobalt_sem_shadow __user *u_sem,
                        int __user *u_sval);
 
-int cobalt_sem_destroy(struct __shadow_sem __user *u_sem);
+int cobalt_sem_destroy(struct cobalt_sem_shadow __user *u_sem);
 
-int cobalt_sem_open(struct __shadow_sem __user *__user *u_addr,
+int cobalt_sem_open(struct cobalt_sem_shadow __user *__user *u_addr,
                    const char __user *u_name,
                    int oflags, mode_t mode, unsigned value);
 
-int cobalt_sem_close(struct __shadow_sem __user *usm);
+int cobalt_sem_close(struct cobalt_sem_shadow __user *usm);
 
 int cobalt_sem_unlink(const char __user *u_name);
 
-int cobalt_sem_init_np(struct __shadow_sem __user *u_sem,
+int cobalt_sem_init_np(struct cobalt_sem_shadow __user *u_sem,
                       int flags, unsigned value);
 
-int cobalt_sem_broadcast_np(struct __shadow_sem __user *u_sem);
+int cobalt_sem_broadcast_np(struct cobalt_sem_shadow __user *u_sem);
 
-int cobalt_sem_inquire(struct __shadow_sem __user *u_sem,
+int cobalt_sem_inquire(struct cobalt_sem_shadow __user *u_sem,
                       struct cobalt_sem_info __user *u_info,
                       pid_t __user *u_waitlist,
                       size_t waitsz);
diff --git a/lib/cobalt/cond.c b/lib/cobalt/cond.c
index 4df2ff0..dea9023 100644
--- a/lib/cobalt/cond.c
+++ b/lib/cobalt/cond.c
@@ -21,7 +21,7 @@
 #include "current.h"
 #include "internal.h"
 
-static inline unsigned long *cond_get_signalsp(struct __shadow_cond *shadow)
+static inline unsigned long *cond_get_signalsp(struct cobalt_cond_shadow 
*shadow)
 {
        if (shadow->attr.pshared)
                return (unsigned long *)(cobalt_sem_heap[1]
@@ -31,7 +31,7 @@ static inline unsigned long *cond_get_signalsp(struct 
__shadow_cond *shadow)
 }
 
 static inline struct mutex_dat *
-cond_get_mutex_datp(struct __shadow_cond *shadow)
+cond_get_mutex_datp(struct cobalt_cond_shadow *shadow)
 {
        if (shadow->mutex_datp == (struct mutex_dat *)~0UL)
                return NULL;
@@ -83,7 +83,7 @@ COBALT_IMPL(int, pthread_condattr_setpshared, 
(pthread_condattr_t *attr, int psh
 COBALT_IMPL(int, pthread_cond_init, (pthread_cond_t *cond,
                                     const pthread_condattr_t * attr))
 {
-       struct __shadow_cond *_cnd = &((union cobalt_cond_union 
*)cond)->shadow_cond;
+       struct cobalt_cond_shadow *_cnd = &((union cobalt_cond_union 
*)cond)->shadow_cond;
        unsigned long *pending_signalsp;
        int err;
 
@@ -105,14 +105,14 @@ COBALT_IMPL(int, pthread_cond_init, (pthread_cond_t *cond,
 
 COBALT_IMPL(int, pthread_cond_destroy, (pthread_cond_t *cond))
 {
-       struct __shadow_cond *_cond = &((union cobalt_cond_union 
*)cond)->shadow_cond;
+       struct cobalt_cond_shadow *_cond = &((union cobalt_cond_union 
*)cond)->shadow_cond;
 
        return -XENOMAI_SKINCALL1(__cobalt_muxid, sc_cobalt_cond_destroy, 
_cond);
 }
 
 struct cobalt_cond_cleanup_t {
-       struct __shadow_cond *cond;
-       struct __shadow_mutex *mutex;
+       struct cobalt_cond_shadow *cond;
+       struct cobalt_mutex_shadow *mutex;
        unsigned count;
        int err;
 };
@@ -133,8 +133,8 @@ static void __pthread_cond_cleanup(void *data)
 
 COBALT_IMPL(int, pthread_cond_wait, (pthread_cond_t *cond, pthread_mutex_t 
*mutex))
 {
-       struct __shadow_cond *_cnd = &((union cobalt_cond_union 
*)cond)->shadow_cond;
-       struct __shadow_mutex *_mx =
+       struct cobalt_cond_shadow *_cnd = &((union cobalt_cond_union 
*)cond)->shadow_cond;
+       struct cobalt_mutex_shadow *_mx =
                &((union cobalt_mutex_union *)mutex)->shadow_mutex;
        struct cobalt_cond_cleanup_t c = {
                .cond = _cnd,
@@ -187,8 +187,8 @@ COBALT_IMPL(int, pthread_cond_timedwait, (pthread_cond_t 
*cond,
                                          pthread_mutex_t *mutex,
                                          const struct timespec *abstime))
 {
-       struct __shadow_cond *_cnd = &((union cobalt_cond_union 
*)cond)->shadow_cond;
-       struct __shadow_mutex *_mx =
+       struct cobalt_cond_shadow *_cnd = &((union cobalt_cond_union 
*)cond)->shadow_cond;
+       struct cobalt_mutex_shadow *_mx =
                &((union cobalt_mutex_union *)mutex)->shadow_mutex;
        struct cobalt_cond_cleanup_t c = {
                .cond = _cnd,
@@ -237,7 +237,7 @@ COBALT_IMPL(int, pthread_cond_timedwait, (pthread_cond_t 
*cond,
 
 COBALT_IMPL(int, pthread_cond_signal, (pthread_cond_t *cond))
 {
-       struct __shadow_cond *_cnd = &((union cobalt_cond_union 
*)cond)->shadow_cond;
+       struct cobalt_cond_shadow *_cnd = &((union cobalt_cond_union 
*)cond)->shadow_cond;
        unsigned long pending_signals, *pending_signalsp;
        struct mutex_dat *mutex_datp;
        unsigned long flags;
@@ -269,7 +269,7 @@ COBALT_IMPL(int, pthread_cond_signal, (pthread_cond_t 
*cond))
 
 COBALT_IMPL(int, pthread_cond_broadcast, (pthread_cond_t *cond))
 {
-       struct __shadow_cond *_cnd = &((union cobalt_cond_union 
*)cond)->shadow_cond;
+       struct cobalt_cond_shadow *_cnd = &((union cobalt_cond_union 
*)cond)->shadow_cond;
        struct mutex_dat *mutex_datp;
        unsigned long flags;
        xnhandle_t cur;
diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c
index c3086a9..e68094b 100644
--- a/lib/cobalt/init.c
+++ b/lib/cobalt/init.c
@@ -168,25 +168,25 @@ void __libcobalt_init(void)
                exit(EXIT_FAILURE);
        }
 
-       if (sizeof(struct __shadow_mutex) > sizeof(pthread_mutex_t)) {
+       if (sizeof(struct cobalt_mutex_shadow) > sizeof(pthread_mutex_t)) {
                report_error("sizeof(pthread_mutex_t): %d <"
                             " sizeof(shadow_mutex): %d !",
                             (int) sizeof(pthread_mutex_t),
-                            (int) sizeof(struct __shadow_mutex));
+                            (int) sizeof(struct cobalt_mutex_shadow));
                exit(EXIT_FAILURE);
        }
-       if (sizeof(struct __shadow_cond) > sizeof(pthread_cond_t)) {
+       if (sizeof(struct cobalt_cond_shadow) > sizeof(pthread_cond_t)) {
                report_error("sizeof(pthread_cond_t): %d <"
                             " sizeof(shadow_cond): %d !",
                             (int) sizeof(pthread_cond_t),
-                            (int) sizeof(struct __shadow_cond));
+                            (int) sizeof(struct cobalt_cond_shadow));
                exit(EXIT_FAILURE);
        }
-       if (sizeof(struct __shadow_sem) > sizeof(sem_t)) {
+       if (sizeof(struct cobalt_sem_shadow) > sizeof(sem_t)) {
                report_error("sizeof(sem_t): %d <"
                             " sizeof(shadow_sem): %d !",
                             (int) sizeof(sem_t),
-                            (int) sizeof(struct __shadow_sem));
+                            (int) sizeof(struct cobalt_sem_shadow));
                exit(EXIT_FAILURE);
        }
 
diff --git a/lib/cobalt/internal.c b/lib/cobalt/internal.c
index 31954e7..5ecc71f 100644
--- a/lib/cobalt/internal.c
+++ b/lib/cobalt/internal.c
@@ -513,7 +513,7 @@ int cobalt_event_inquire(cobalt_event_t *event, unsigned 
long *bits_r)
 int cobalt_sem_inquire(sem_t *sem, struct cobalt_sem_info *info,
                       pid_t *waitlist, size_t waitsz)
 {
-       struct __shadow_sem *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
+       struct cobalt_sem_shadow *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
        
        return XENOMAI_SKINCALL4(__cobalt_muxid,
                                 sc_cobalt_sem_inquire, _sem,
diff --git a/lib/cobalt/internal.h b/lib/cobalt/internal.h
index c1845bb..70c1f05 100644
--- a/lib/cobalt/internal.h
+++ b/lib/cobalt/internal.h
@@ -45,7 +45,7 @@ void cobalt_sigshadow_install_once(void);
 
 extern unsigned long cobalt_sem_heap[2];
 
-static inline struct mutex_dat *mutex_get_datp(struct __shadow_mutex *shadow)
+static inline struct mutex_dat *mutex_get_datp(struct cobalt_mutex_shadow 
*shadow)
 {
        if (shadow->attr.pshared)
                return (struct mutex_dat *)(cobalt_sem_heap[1] + 
shadow->dat_offset);
@@ -53,7 +53,7 @@ static inline struct mutex_dat *mutex_get_datp(struct 
__shadow_mutex *shadow)
        return shadow->dat;
 }
 
-static inline atomic_long_t *mutex_get_ownerp(struct __shadow_mutex *shadow)
+static inline atomic_long_t *mutex_get_ownerp(struct cobalt_mutex_shadow 
*shadow)
 {
        return &mutex_get_datp(shadow)->owner;
 }
diff --git a/lib/cobalt/mutex.c b/lib/cobalt/mutex.c
index 39d85a4..95eef49 100644
--- a/lib/cobalt/mutex.c
+++ b/lib/cobalt/mutex.c
@@ -76,7 +76,7 @@ COBALT_IMPL(int, pthread_mutexattr_setpshared, 
(pthread_mutexattr_t *attr, int p
 COBALT_IMPL(int, pthread_mutex_init, (pthread_mutex_t *mutex,
                                      const pthread_mutexattr_t *attr))
 {
-       struct __shadow_mutex *_mutex =
+       struct cobalt_mutex_shadow *_mutex =
                &((union cobalt_mutex_union *)mutex)->shadow_mutex;
        struct mutex_dat *datp;
        int err;
@@ -107,7 +107,7 @@ COBALT_IMPL(int, pthread_mutex_init, (pthread_mutex_t 
*mutex,
 
 COBALT_IMPL(int, pthread_mutex_destroy, (pthread_mutex_t *mutex))
 {
-       struct __shadow_mutex *_mutex =
+       struct cobalt_mutex_shadow *_mutex =
                &((union cobalt_mutex_union *)mutex)->shadow_mutex;
        int err;
 
@@ -121,7 +121,7 @@ COBALT_IMPL(int, pthread_mutex_destroy, (pthread_mutex_t 
*mutex))
 
 COBALT_IMPL(int, pthread_mutex_lock, (pthread_mutex_t *mutex))
 {
-       struct __shadow_mutex *_mutex =
+       struct cobalt_mutex_shadow *_mutex =
                &((union cobalt_mutex_union *)mutex)->shadow_mutex;
        unsigned long status;
        xnhandle_t cur;
@@ -180,7 +180,7 @@ COBALT_IMPL(int, pthread_mutex_lock, (pthread_mutex_t 
*mutex))
 COBALT_IMPL(int, pthread_mutex_timedlock, (pthread_mutex_t *mutex,
                                           const struct timespec *to))
 {
-       struct __shadow_mutex *_mutex =
+       struct cobalt_mutex_shadow *_mutex =
                &((union cobalt_mutex_union *)mutex)->shadow_mutex;
        unsigned long status;
        xnhandle_t cur;
@@ -235,7 +235,7 @@ COBALT_IMPL(int, pthread_mutex_timedlock, (pthread_mutex_t 
*mutex,
 
 COBALT_IMPL(int, pthread_mutex_trylock, (pthread_mutex_t *mutex))
 {
-       struct __shadow_mutex *_mutex =
+       struct cobalt_mutex_shadow *_mutex =
                &((union cobalt_mutex_union *)mutex)->shadow_mutex;
        unsigned long status;
        xnhandle_t cur;
@@ -288,7 +288,7 @@ do_syscall:
 
 COBALT_IMPL(int, pthread_mutex_unlock, (pthread_mutex_t *mutex))
 {
-       struct __shadow_mutex *_mutex =
+       struct cobalt_mutex_shadow *_mutex =
                &((union cobalt_mutex_union *)mutex)->shadow_mutex;
        struct mutex_dat *datp = NULL;
        xnhandle_t cur = XN_NO_HANDLE;
diff --git a/lib/cobalt/semaphore.c b/lib/cobalt/semaphore.c
index 88535a8..e60994c 100644
--- a/lib/cobalt/semaphore.c
+++ b/lib/cobalt/semaphore.c
@@ -26,7 +26,7 @@
 #include <cobalt/uapi/sem.h>
 #include "internal.h"
 
-static inline struct sem_dat *sem_get_datp(struct __shadow_sem *shadow)
+static inline struct sem_dat *sem_get_datp(struct cobalt_sem_shadow *shadow)
 {
        unsigned pshared = shadow->datp_offset < 0;
        
@@ -40,7 +40,7 @@ static inline struct sem_dat *sem_get_datp(struct 
__shadow_sem *shadow)
 
 COBALT_IMPL(int, sem_init, (sem_t *sem, int pshared, unsigned value))
 {
-       struct __shadow_sem *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
+       struct cobalt_sem_shadow *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
        int err;
 
        err = -XENOMAI_SKINCALL3(__cobalt_muxid,
@@ -56,7 +56,7 @@ COBALT_IMPL(int, sem_init, (sem_t *sem, int pshared, unsigned 
value))
 
 COBALT_IMPL(int, sem_destroy, (sem_t *sem))
 {
-       struct __shadow_sem *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
+       struct cobalt_sem_shadow *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
        int err;
 
        if (_sem->magic != COBALT_SEM_MAGIC
@@ -75,7 +75,7 @@ COBALT_IMPL(int, sem_destroy, (sem_t *sem))
 
 COBALT_IMPL(int, sem_post, (sem_t *sem))
 {
-       struct __shadow_sem *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
+       struct cobalt_sem_shadow *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
        struct sem_dat *datp;
        long value;
        int err;
@@ -119,7 +119,7 @@ COBALT_IMPL(int, sem_post, (sem_t *sem))
 
 COBALT_IMPL(int, sem_trywait, (sem_t *sem))
 {
-       struct __shadow_sem *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
+       struct cobalt_sem_shadow *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
        struct sem_dat *datp;
        long value;
 
@@ -155,7 +155,7 @@ COBALT_IMPL(int, sem_trywait, (sem_t *sem))
 
 COBALT_IMPL(int, sem_wait, (sem_t *sem))
 {
-       struct __shadow_sem *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
+       struct cobalt_sem_shadow *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
        int err, oldtype;
 
        err = __RT(sem_trywait(sem));
@@ -178,7 +178,7 @@ COBALT_IMPL(int, sem_wait, (sem_t *sem))
 
 COBALT_IMPL(int, sem_timedwait, (sem_t *sem, const struct timespec *ts))
 {
-       struct __shadow_sem *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
+       struct cobalt_sem_shadow *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
        int err, oldtype;
 
        err = __RT(sem_trywait(sem));
@@ -202,7 +202,7 @@ COBALT_IMPL(int, sem_timedwait, (sem_t *sem, const struct 
timespec *ts))
 
 COBALT_IMPL(int, sem_getvalue, (sem_t *sem, int *sval))
 {
-       struct __shadow_sem *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
+       struct cobalt_sem_shadow *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
        struct sem_dat *datp;
        long value;
 
@@ -262,7 +262,7 @@ COBALT_IMPL(sem_t *, sem_open, (const char *name, int 
oflags, ...))
 
 COBALT_IMPL(int, sem_close, (sem_t *sem))
 {
-       struct __shadow_sem *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
+       struct cobalt_sem_shadow *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
        int err;
 
        if (_sem->magic != COBALT_NAMED_SEM_MAGIC) {
@@ -296,7 +296,7 @@ COBALT_IMPL(int, sem_unlink, (const char *name))
 
 int sem_init_np(sem_t *sem, int flags, unsigned int value)
 {
-       struct __shadow_sem *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
+       struct cobalt_sem_shadow *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
        int err;
 
        err = -XENOMAI_SKINCALL3(__cobalt_muxid,
@@ -310,7 +310,7 @@ int sem_init_np(sem_t *sem, int flags, unsigned int value)
 
 int sem_broadcast_np(sem_t *sem)
 {
-       struct __shadow_sem *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
+       struct cobalt_sem_shadow *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
        struct sem_dat *datp;
        long value;
        int err;


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

Reply via email to