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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Jun 11 18:28:50 2013 +0200

copperplate: introduce PRIVATE_LIST_INITIALIZER()

---

 include/copperplate/private-list.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/copperplate/private-list.h 
b/include/copperplate/private-list.h
index d64fed8..3f7e917 100644
--- a/include/copperplate/private-list.h
+++ b/include/copperplate/private-list.h
@@ -32,11 +32,11 @@ struct pvlist {
        struct pvholder head;
 };
 
-#define DEFINE_PRIVATE_LIST(name) \
-       struct pvlist name = { .head = { .next = &(name.head), .prev = 
&(name.head) } }
+#define PRIVATE_LIST_INITIALIZER(__name) \
+       { .head = { .next = &((__name).head), .prev = &((__name).head) } }
 
-#define INIT_PRIVATE_HOLDER(name) \
-       { .next = &(name), .prev = &(name) }
+#define DEFINE_PRIVATE_LIST(__name) \
+       struct pvlist __name = PRIVATE_LIST_INITIALIZER(__name)
 
 static inline void initpvh(struct pvholder *holder)
 {


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

Reply via email to