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

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

psos/queue: fix for pshared mode

---

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

diff --git a/lib/psos/queue.c b/lib/psos/queue.c
index c3a27ae..42d0130 100644
--- a/lib/psos/queue.c
+++ b/lib/psos/queue.c
@@ -258,7 +258,7 @@ static u_long __q_send_inner(struct psos_queue *q, unsigned 
long flags,
                if (bytes > maxbytes)
                        bytes = maxbytes;
                if (bytes > 0)
-                       memcpy(wait->ptr, buffer, bytes);
+                       memcpy(__mptr(wait->ptr), buffer, bytes);
                wait->size = bytes;
                goto done;
        }
@@ -462,7 +462,7 @@ retry:
                timespec = NULL;
 
        wait = threadobj_prepare_wait(struct psos_queue_wait);
-       wait->ptr = buffer;
+       wait->ptr = __moff(buffer);
        wait->size = msglen;
 
        ret = syncobj_wait_grant(&q->sobj, timespec, &syns);
diff --git a/lib/psos/queue.h b/lib/psos/queue.h
index 0493a8a..4ca4389 100644
--- a/lib/psos/queue.h
+++ b/lib/psos/queue.h
@@ -43,7 +43,7 @@ struct psos_queue {
 
 struct psos_queue_wait {
        size_t size;
-       void *ptr;
+       dref_type(void *) ptr;
 };
 
 extern struct cluster psos_queue_table;


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

Reply via email to