Module: xenomai-forge
Branch: rtdm-api-waitqueues
Commit: 9ad93d95a3dce2f6cb6c815847133d90f24de288
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=9ad93d95a3dce2f6cb6c815847133d90f24de288

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Apr 16 11:07:04 2014 +0200

lib: use symbolic constant for name length

---

 include/alchemy/alarm.h          |    2 +-
 include/alchemy/buffer.h         |    2 +-
 include/alchemy/cond.h           |    2 +-
 include/alchemy/event.h          |    2 +-
 include/alchemy/heap.h           |    2 +-
 include/alchemy/mutex.h          |    2 +-
 include/alchemy/queue.h          |    2 +-
 include/alchemy/sem.h            |    2 +-
 include/alchemy/task.h           |    2 +-
 include/copperplate/clockobj.h   |    1 +
 include/copperplate/reference.h  |    1 +
 lib/alchemy/alarm.h              |    2 +-
 lib/alchemy/buffer.h             |    2 +-
 lib/alchemy/cond.h               |    2 +-
 lib/alchemy/event.h              |    2 +-
 lib/alchemy/heap.c               |    2 +-
 lib/alchemy/heap.h               |    2 +-
 lib/alchemy/mutex.h              |    2 +-
 lib/alchemy/pipe.h               |    2 +-
 lib/alchemy/queue.h              |    2 +-
 lib/alchemy/sem.h                |    2 +-
 lib/alchemy/task.h               |    2 +-
 lib/copperplate/internal.h       |    3 ++-
 lib/copperplate/regd/fs-common.c |    2 +-
 lib/copperplate/regd/sysregfs.h  |    2 +-
 lib/psos/pt.h                    |    2 +-
 lib/psos/queue.h                 |    2 +-
 lib/psos/rn.h                    |    2 +-
 lib/psos/sem.h                   |    2 +-
 lib/psos/task.h                  |    2 +-
 lib/vxworks/msgQLib.h            |    2 +-
 lib/vxworks/taskLib.h            |    2 +-
 32 files changed, 33 insertions(+), 30 deletions(-)

diff --git a/include/alchemy/alarm.h b/include/alchemy/alarm.h
index 61d3c5c..fd84150 100644
--- a/include/alchemy/alarm.h
+++ b/include/alchemy/alarm.h
@@ -43,7 +43,7 @@ struct RT_ALARM_INFO {
        /**
         * Name of alarm object.
         */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
 };
 
 typedef struct RT_ALARM_INFO RT_ALARM_INFO;
diff --git a/include/alchemy/buffer.h b/include/alchemy/buffer.h
index 27be2a5..7e1f111 100644
--- a/include/alchemy/buffer.h
+++ b/include/alchemy/buffer.h
@@ -61,7 +61,7 @@ struct RT_BUFFER_INFO {
        /**
         * Name of the buffer.
         */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
 };
 
 typedef struct RT_BUFFER_INFO RT_BUFFER_INFO;
diff --git a/include/alchemy/cond.h b/include/alchemy/cond.h
index 4667f14..3b6868b 100644
--- a/include/alchemy/cond.h
+++ b/include/alchemy/cond.h
@@ -40,7 +40,7 @@ struct RT_COND_INFO {
        /**
         * Name of condition variable.
         */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
 };
 
 typedef struct RT_COND_INFO RT_COND_INFO;
diff --git a/include/alchemy/event.h b/include/alchemy/event.h
index 14b313d..980e4ce 100644
--- a/include/alchemy/event.h
+++ b/include/alchemy/event.h
@@ -55,7 +55,7 @@ struct RT_EVENT_INFO {
        /**
         * Name of event flag group.
         */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
 };
 
 typedef struct RT_EVENT_INFO RT_EVENT_INFO;
diff --git a/include/alchemy/heap.h b/include/alchemy/heap.h
index b331136..2ff02ef 100644
--- a/include/alchemy/heap.h
+++ b/include/alchemy/heap.h
@@ -71,7 +71,7 @@ struct RT_HEAP_INFO {
        /**
         * Name of heap.
         */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
 };
 
 typedef struct RT_HEAP_INFO RT_HEAP_INFO;
diff --git a/include/alchemy/mutex.h b/include/alchemy/mutex.h
index 9b4e36c..6b3d126 100644
--- a/include/alchemy/mutex.h
+++ b/include/alchemy/mutex.h
@@ -46,7 +46,7 @@ struct RT_MUTEX_INFO {
        /**
         * Name of mutex.
         */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
 };
 
 typedef struct RT_MUTEX_INFO RT_MUTEX_INFO;
diff --git a/include/alchemy/queue.h b/include/alchemy/queue.h
index dba385c..d5a035c 100644
--- a/include/alchemy/queue.h
+++ b/include/alchemy/queue.h
@@ -81,7 +81,7 @@ struct RT_QUEUE_INFO {
        /**
         * Name of message queue.
         */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
 };
 
 typedef struct RT_QUEUE_INFO RT_QUEUE_INFO;
diff --git a/include/alchemy/sem.h b/include/alchemy/sem.h
index 51caf1d..94d98f7 100644
--- a/include/alchemy/sem.h
+++ b/include/alchemy/sem.h
@@ -52,7 +52,7 @@ struct RT_SEM_INFO {
        /**
         * Name of semaphore.
         */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
 };
 
 typedef struct RT_SEM_INFO RT_SEM_INFO;
diff --git a/include/alchemy/task.h b/include/alchemy/task.h
index b8f2ec0..7a2eb1c 100644
--- a/include/alchemy/task.h
+++ b/include/alchemy/task.h
@@ -75,7 +75,7 @@ struct RT_TASK_INFO {
        /**
         * Name of task.
         */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
 };
 
 typedef struct RT_TASK_INFO RT_TASK_INFO;
diff --git a/include/copperplate/clockobj.h b/include/copperplate/clockobj.h
index 56d24b4..58dbbf9 100644
--- a/include/copperplate/clockobj.h
+++ b/include/copperplate/clockobj.h
@@ -24,6 +24,7 @@
 #include <boilerplate/time.h>
 #include <boilerplate/list.h>
 #include <boilerplate/lock.h>
+#include <boilerplate/limits.h>
 #include <copperplate/debug.h>
 
 /*
diff --git a/include/copperplate/reference.h b/include/copperplate/reference.h
index 37bdadc..0a5e3b2 100644
--- a/include/copperplate/reference.h
+++ b/include/copperplate/reference.h
@@ -18,6 +18,7 @@
 #ifndef _COPPERPLATE_REFERENCE_H
 #define _COPPERPLATE_REFERENCE_H
 
+#include <boilerplate/limits.h>
 #include <boilerplate/scope.h>
 
 #define libcopperplate_tag  0  /* Library tag - unique and constant. */
diff --git a/lib/alchemy/alarm.h b/lib/alchemy/alarm.h
index 2abd5ce..24ba455 100644
--- a/lib/alchemy/alarm.h
+++ b/lib/alchemy/alarm.h
@@ -26,7 +26,7 @@
 
 struct alchemy_alarm {
        unsigned int magic;     /* Must be first. */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
        struct timerobj tmobj;
        struct pvclusterobj cobj;
        void (*handler)(void *arg);
diff --git a/lib/alchemy/buffer.h b/lib/alchemy/buffer.h
index b130715..beb1f5b 100644
--- a/lib/alchemy/buffer.h
+++ b/lib/alchemy/buffer.h
@@ -26,7 +26,7 @@
 
 struct alchemy_buffer {
        unsigned int magic;     /* Must be first. */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
        struct syncobj sobj;
        struct clusterobj cobj;
        size_t bufsz;
diff --git a/lib/alchemy/cond.h b/lib/alchemy/cond.h
index faf2166..a807636 100644
--- a/lib/alchemy/cond.h
+++ b/lib/alchemy/cond.h
@@ -27,7 +27,7 @@ struct threadobj;
 
 struct alchemy_cond {
        unsigned int magic;     /* Must be first. */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
        pthread_cond_t cond;
        struct clusterobj cobj;
        struct fsobj fsobj;
diff --git a/lib/alchemy/event.h b/lib/alchemy/event.h
index f973016..7ea53c3 100644
--- a/lib/alchemy/event.h
+++ b/lib/alchemy/event.h
@@ -26,7 +26,7 @@
 
 struct alchemy_event {
        unsigned int magic;     /* Must be first. */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
        struct eventobj evobj;
        struct clusterobj cobj;
        struct fsobj fsobj;
diff --git a/lib/alchemy/heap.c b/lib/alchemy/heap.c
index 19a1c61..46e691c 100644
--- a/lib/alchemy/heap.c
+++ b/lib/alchemy/heap.c
@@ -46,7 +46,7 @@ DEFINE_SYNC_LOOKUP(heap, RT_HEAP);
 #ifdef CONFIG_XENO_REGISTRY
 
 struct heap_waiter_data {
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
        size_t reqsz;
 };
 
diff --git a/lib/alchemy/heap.h b/lib/alchemy/heap.h
index 91bdce2..909454d 100644
--- a/lib/alchemy/heap.h
+++ b/lib/alchemy/heap.h
@@ -27,7 +27,7 @@
 
 struct alchemy_heap {
        unsigned int magic;     /* Must be first. */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
        struct heapobj hobj;
        struct syncobj sobj;
        struct clusterobj cobj;
diff --git a/lib/alchemy/mutex.h b/lib/alchemy/mutex.h
index 8a55b5c..998074c 100644
--- a/lib/alchemy/mutex.h
+++ b/lib/alchemy/mutex.h
@@ -26,7 +26,7 @@
 
 struct alchemy_mutex {
        unsigned int magic;     /* Must be first. */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
        pthread_mutex_t lock;
        struct clusterobj cobj;
        RT_TASK owner;
diff --git a/lib/alchemy/pipe.h b/lib/alchemy/pipe.h
index 1cfb6c0..5d90d75 100644
--- a/lib/alchemy/pipe.h
+++ b/lib/alchemy/pipe.h
@@ -27,7 +27,7 @@
 
 struct alchemy_pipe {
        unsigned int magic;     /* Must be first. */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
        int sock;
        struct clusterobj cobj;
 };
diff --git a/lib/alchemy/queue.h b/lib/alchemy/queue.h
index ddfe2ed..04c3c15 100644
--- a/lib/alchemy/queue.h
+++ b/lib/alchemy/queue.h
@@ -28,7 +28,7 @@
 
 struct alchemy_queue {
        unsigned int magic;     /* Must be first. */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
        int mode;
        size_t limit;
        struct heapobj hobj;
diff --git a/lib/alchemy/sem.h b/lib/alchemy/sem.h
index f8bacf1..ee2ff2f 100644
--- a/lib/alchemy/sem.h
+++ b/lib/alchemy/sem.h
@@ -26,7 +26,7 @@
 
 struct alchemy_sem {
        unsigned int magic;     /* Must be first. */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
        struct semobj smobj;
        struct clusterobj cobj;
        struct fsobj fsobj;
diff --git a/lib/alchemy/task.h b/lib/alchemy/task.h
index b7277a1..e2e0b60 100644
--- a/lib/alchemy/task.h
+++ b/lib/alchemy/task.h
@@ -30,7 +30,7 @@
 #include <alchemy/task.h>
 
 struct alchemy_task {
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
        int mode;
        cpu_set_t affinity;
        int suspends;
diff --git a/lib/copperplate/internal.h b/lib/copperplate/internal.h
index e56a3bd..9146d31 100644
--- a/lib/copperplate/internal.h
+++ b/lib/copperplate/internal.h
@@ -27,6 +27,7 @@
 #include <xeno_config.h>
 #include <boilerplate/list.h>
 #include <boilerplate/ancillaries.h>
+#include <boilerplate/limits.h>
 #include <copperplate/heapobj.h>
 
 #define HOBJ_MINLOG2    3
@@ -38,7 +39,7 @@
  * to process local memory in there.
  */
 struct shared_heap {
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
        pthread_mutex_t lock;
        struct list extents;
        size_t extentsize;
diff --git a/lib/copperplate/regd/fs-common.c b/lib/copperplate/regd/fs-common.c
index 6346320..36c4b34 100644
--- a/lib/copperplate/regd/fs-common.c
+++ b/lib/copperplate/regd/fs-common.c
@@ -191,7 +191,7 @@ out:
 }
 
 struct heap_data {
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
        size_t total;
        size_t used;
 };
diff --git a/lib/copperplate/regd/sysregfs.h b/lib/copperplate/regd/sysregfs.h
index 0f9cca7..a7c0252 100644
--- a/lib/copperplate/regd/sysregfs.h
+++ b/lib/copperplate/regd/sysregfs.h
@@ -34,7 +34,7 @@ struct sysreg_fsfile {
 };
 
 struct thread_data {
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
        pid_t pid;
        int priority;
        int policy;
diff --git a/lib/psos/pt.h b/lib/psos/pt.h
index 2a99ee0..e61899d 100644
--- a/lib/psos/pt.h
+++ b/lib/psos/pt.h
@@ -26,7 +26,7 @@
 
 struct psos_pt {
        unsigned int magic;             /* Must be first. */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
        struct pvclusterobj cobj;
        pthread_mutex_t lock;
 
diff --git a/lib/psos/queue.h b/lib/psos/queue.h
index eaff949..0493a8a 100644
--- a/lib/psos/queue.h
+++ b/lib/psos/queue.h
@@ -29,7 +29,7 @@
 
 struct psos_queue {
        unsigned int magic;             /* Must be first. */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
 
        u_long flags;
        u_long maxmsg;
diff --git a/lib/psos/rn.h b/lib/psos/rn.h
index 77a6629..43dd7a1 100644
--- a/lib/psos/rn.h
+++ b/lib/psos/rn.h
@@ -26,7 +26,7 @@
 
 struct psos_rn {
        unsigned int magic;             /* Must be first. */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
 
        u_long flags;
        u_long length;
diff --git a/lib/psos/sem.h b/lib/psos/sem.h
index 4ed8f73..e572e22 100644
--- a/lib/psos/sem.h
+++ b/lib/psos/sem.h
@@ -25,7 +25,7 @@
 
 struct psos_sem {
        unsigned int magic;             /* Must be first. */
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
        struct semobj smobj;
        struct clusterobj cobj;
 };
diff --git a/lib/psos/task.h b/lib/psos/task.h
index e581c80..2b6f27a 100644
--- a/lib/psos/task.h
+++ b/lib/psos/task.h
@@ -42,7 +42,7 @@ struct psos_task {
        u_long notepad[PSOSTASK_NR_REGS];
        struct pvlist timer_list; /* Private. Never accessed remotely. */
 
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
        struct psos_task_args args;
 
        struct threadobj thobj;
diff --git a/lib/vxworks/msgQLib.h b/lib/vxworks/msgQLib.h
index 542c7db..2c31268 100644
--- a/lib/vxworks/msgQLib.h
+++ b/lib/vxworks/msgQLib.h
@@ -26,7 +26,7 @@
 struct wind_mq {
        unsigned int magic;
        int options;
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
 
        int maxmsg;
        UINT msgsize;
diff --git a/lib/vxworks/taskLib.h b/lib/vxworks/taskLib.h
index 6a7babf..fa458c2 100644
--- a/lib/vxworks/taskLib.h
+++ b/lib/vxworks/taskLib.h
@@ -46,7 +46,7 @@ struct wind_task {
        struct WIND_TCB *tcb;
        struct WIND_TCB priv_tcb;
 
-       char name[32];
+       char name[XNOBJECT_NAME_LEN];
        struct wind_task_args args;
 
        struct threadobj thobj;


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

Reply via email to