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

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

psos/rn: fix for remote requests (pshared)

---

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

diff --git a/lib/psos/rn.c b/lib/psos/rn.c
index e665b33..f87e19e 100644
--- a/lib/psos/rn.c
+++ b/lib/psos/rn.c
@@ -264,7 +264,7 @@ starve:
                timespec = NULL;
 
        wait = threadobj_prepare_wait(struct psos_rn_wait);
-       wait->ptr = NULL;
+       wait->ptr = __moff(NULL);
        wait->size = size;
 
        ret = syncobj_wait_grant(&rn->sobj, timespec, &syns);
@@ -279,7 +279,7 @@ starve:
                goto out;
        }
 
-       *segaddr = wait->ptr;
+       *segaddr = __mptr(wait->ptr);
 done:
        syncobj_unlock(&rn->sobj, &syns);
 out:
@@ -329,7 +329,7 @@ u_long rn_retseg(u_long rnid, void *segaddr)
                if (seg) {
                        rn->busynr++;
                        rn->usedmem += heapobj_validate(&rn->hobj, seg);
-                       wait->ptr = seg;
+                       wait->ptr = __moff(seg);
                        syncobj_grant_to(&rn->sobj, thobj);
                }
        }
diff --git a/lib/psos/rn.h b/lib/psos/rn.h
index 43dd7a1..1a026a0 100644
--- a/lib/psos/rn.h
+++ b/lib/psos/rn.h
@@ -41,7 +41,7 @@ struct psos_rn {
 
 struct psos_rn_wait {
        size_t size;
-       void *ptr;
+       dref_type(void *) ptr;
 };
 
 extern struct pvcluster psos_rn_table;


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

Reply via email to