Module: xenomai-3
Branch: next
Commit: 343b9407582993821c9e72a59bad525d6a082f16
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=343b9407582993821c9e72a59bad525d6a082f16

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Jun  1 17:25:37 2015 +0200

alchemy/queue: fix for pshared mode

---

 lib/alchemy/queue.c |    4 ++--
 lib/alchemy/queue.h |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/alchemy/queue.c b/lib/alchemy/queue.c
index f53bc7a..42f82c7 100644
--- a/lib/alchemy/queue.c
+++ b/lib/alchemy/queue.c
@@ -654,7 +654,7 @@ int rt_queue_write(RT_QUEUE *queue,
                if (size > usersz)
                        size = usersz;
                if (size > 0)
-                       memcpy(wait->userbuf, buf, size);
+                       memcpy(__mptr(wait->userbuf), buf, size);
                wait->usersz = size;
                syncobj_grant_to(&qcb->sobj, waiter);
                ret = 1;
@@ -981,7 +981,7 @@ wait:
        }
 
        wait = threadobj_prepare_wait(struct alchemy_queue_wait);
-       wait->userbuf = buf;
+       wait->userbuf = __moff(buf);
        wait->usersz = size;
        wait->msg = NULL;
 
diff --git a/lib/alchemy/queue.h b/lib/alchemy/queue.h
index 04c3c15..8aa3327 100644
--- a/lib/alchemy/queue.h
+++ b/lib/alchemy/queue.h
@@ -50,7 +50,7 @@ struct alchemy_queue_msg {
 
 struct alchemy_queue_wait {
        struct alchemy_queue_msg *msg;
-       void *userbuf;
+       dref_type(void *) userbuf;
        size_t usersz;
 };
 


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

Reply via email to