Module: xenomai-3
Branch: stable-3.0.x
Commit: e539ab0b1db5ca56f8d3db39d2ca0bdf009c9b25
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=e539ab0b1db5ca56f8d3db39d2ca0bdf009c9b25

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Sep 13 09:36:11 2016 +0200

boilerplate/ancillaries: fix unique name generation in pshared mode

---

 lib/boilerplate/ancillaries.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/boilerplate/ancillaries.c b/lib/boilerplate/ancillaries.c
index a811a40..0f469a4 100644
--- a/lib/boilerplate/ancillaries.c
+++ b/lib/boilerplate/ancillaries.c
@@ -231,7 +231,11 @@ char *generate_name(char *buf, const char *radix,
                buf[len] = '\0';
        } else {
                tag = atomic_add_fetch(&ngen->serial, 1);
+#ifdef CONFIG_XENO_PSHARED
+               snprintf(buf, len, "%s@%d[%d]", ngen->radix, tag, __node_id);
+#else
                snprintf(buf, len, "%s@%d", ngen->radix, tag);
+#endif
        }
 
        return buf;


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

Reply via email to