Module: xenomai-head
Branch: master
Commit: 0caf3beaaadf2f47e838366eb1a4d1acde2bbdfb
URL:    
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=0caf3beaaadf2f47e838366eb1a4d1acde2bbdfb

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Sep  6 15:45:10 2010 +0200

rtipc: fix build for non-pervasive mode

---

 ksrc/drivers/ipc/bufp.c |   10 ++++++++--
 ksrc/drivers/ipc/iddp.c |   10 ++++++++--
 ksrc/drivers/ipc/xddp.c |   15 ++++++++++++---
 3 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/ksrc/drivers/ipc/bufp.c b/ksrc/drivers/ipc/bufp.c
index 7517b79..10b12f7 100644
--- a/ksrc/drivers/ipc/bufp.c
+++ b/ksrc/drivers/ipc/bufp.c
@@ -325,11 +325,14 @@ static ssize_t __bufp_recvmsg(struct rtipc_private *priv,
                if (iov[nvec].iov_len == 0)
                        continue;
                vlen = wrlen >= iov[nvec].iov_len ? iov[nvec].iov_len : wrlen;
+#ifdef CONFIG_XENO_OPT_PERVASIVE
                if (user_info) {
                        xnbufd_map_uread(&bufd, iov[nvec].iov_base, vlen);
                        ret = __bufp_readbuf(sk, &bufd, flags);
                        xnbufd_unmap_uread(&bufd);
-               } else {
+               } else
+#endif
+               {
                        xnbufd_map_kread(&bufd, iov[nvec].iov_base, vlen);
                        ret = __bufp_readbuf(sk, &bufd, flags);
                        xnbufd_unmap_kread(&bufd);
@@ -575,11 +578,14 @@ static ssize_t __bufp_sendmsg(struct rtipc_private *priv,
                if (iov[nvec].iov_len == 0)
                        continue;
                vlen = rdlen >= iov[nvec].iov_len ? iov[nvec].iov_len : rdlen;
+#ifdef CONFIG_XENO_OPT_PERVASIVE
                if (user_info) {
                        xnbufd_map_uread(&bufd, iov[nvec].iov_base, vlen);
                        ret = __bufp_writebuf(rsk, sk, &bufd, flags);
                        xnbufd_unmap_uread(&bufd);
-               } else {
+               } else
+#endif
+               {
                        xnbufd_map_kread(&bufd, iov[nvec].iov_base, vlen);
                        ret = __bufp_writebuf(rsk, sk, &bufd, flags);
                        xnbufd_unmap_kread(&bufd);
diff --git a/ksrc/drivers/ipc/iddp.c b/ksrc/drivers/ipc/iddp.c
index 8a1b079..61329e2 100644
--- a/ksrc/drivers/ipc/iddp.c
+++ b/ksrc/drivers/ipc/iddp.c
@@ -289,11 +289,14 @@ static ssize_t __iddp_recvmsg(struct rtipc_private *priv,
                if (iov[nvec].iov_len == 0)
                        continue;
                vlen = wrlen >= iov[nvec].iov_len ? iov[nvec].iov_len : wrlen;
+#ifdef CONFIG_XENO_OPT_PERVASIVE
                if (user_info) {
                        xnbufd_map_uread(&bufd, iov[nvec].iov_base, vlen);
                        ret = xnbufd_copy_from_kmem(&bufd, mbuf->data + rdoff, 
vlen);
                        xnbufd_unmap_uread(&bufd);
-               } else {
+               } else
+#endif
+               {
                        xnbufd_map_kread(&bufd, iov[nvec].iov_base, vlen);
                        ret = xnbufd_copy_from_kmem(&bufd, mbuf->data + rdoff, 
vlen);
                        xnbufd_unmap_kread(&bufd);
@@ -409,11 +412,14 @@ static ssize_t __iddp_sendmsg(struct rtipc_private *priv,
                if (iov[nvec].iov_len == 0)
                        continue;
                vlen = rdlen >= iov[nvec].iov_len ? iov[nvec].iov_len : rdlen;
+#ifdef CONFIG_XENO_OPT_PERVASIVE
                if (user_info) {
                        xnbufd_map_uread(&bufd, iov[nvec].iov_base, vlen);
                        ret = xnbufd_copy_to_kmem(mbuf->data + wroff, &bufd, 
vlen);
                        xnbufd_unmap_uread(&bufd);
-               } else {
+               } else
+#endif
+               {
                        xnbufd_map_kread(&bufd, iov[nvec].iov_base, vlen);
                        ret = xnbufd_copy_to_kmem(mbuf->data + wroff, &bufd, 
vlen);
                        xnbufd_unmap_kread(&bufd);
diff --git a/ksrc/drivers/ipc/xddp.c b/ksrc/drivers/ipc/xddp.c
index c2a65e9..55936ed 100644
--- a/ksrc/drivers/ipc/xddp.c
+++ b/ksrc/drivers/ipc/xddp.c
@@ -315,11 +315,14 @@ static ssize_t __xddp_recvmsg(struct rtipc_private *priv,
                if (iov[nvec].iov_len == 0)
                        continue;
                vlen = wrlen >= iov[nvec].iov_len ? iov[nvec].iov_len : wrlen;
+#ifdef CONFIG_XENO_OPT_PERVASIVE
                if (user_info) {
                        xnbufd_map_uread(&bufd, iov[nvec].iov_base, vlen);
                        ret = xnbufd_copy_from_kmem(&bufd, mbuf->data + rdoff, 
vlen);
                        xnbufd_unmap_uread(&bufd);
-               } else {
+               } else
+#endif
+               {
                        xnbufd_map_kread(&bufd, iov[nvec].iov_base, vlen);
                        ret = xnbufd_copy_from_kmem(&bufd, mbuf->data + rdoff, 
vlen);
                        xnbufd_unmap_kread(&bufd);
@@ -512,11 +515,14 @@ static ssize_t __xddp_sendmsg(struct rtipc_private *priv,
                        if (iov[nvec].iov_len == 0)
                                continue;
                        vlen = rdlen >= iov[nvec].iov_len ? iov[nvec].iov_len : 
rdlen;
+#ifdef CONFIG_XENO_OPT_PERVASIVE
                        if (user_info) {
                                xnbufd_map_uread(&bufd, iov[nvec].iov_base, 
vlen);
                                ret = __xddp_stream(rsk, from, &bufd);
                                xnbufd_unmap_uread(&bufd);
-                       } else {
+                       } else
+#endif
+                       {
                                xnbufd_map_kread(&bufd, iov[nvec].iov_base, 
vlen);
                                ret = __xddp_stream(rsk, from, &bufd);
                                xnbufd_unmap_kread(&bufd);
@@ -555,11 +561,14 @@ nostream:
                if (iov[nvec].iov_len == 0)
                        continue;
                vlen = rdlen >= iov[nvec].iov_len ? iov[nvec].iov_len : rdlen;
+#ifdef CONFIG_XENO_OPT_PERVASIVE
                if (user_info) {
                        xnbufd_map_uread(&bufd, iov[nvec].iov_base, vlen);
                        ret = xnbufd_copy_to_kmem(mbuf->data + wrlen, &bufd, 
vlen);
                        xnbufd_unmap_uread(&bufd);
-               } else {
+               } else
+#endif
+               {
                        xnbufd_map_kread(&bufd, iov[nvec].iov_base, vlen);
                        ret = xnbufd_copy_to_kmem(mbuf->data + wrlen, &bufd, 
vlen);
                        xnbufd_unmap_kread(&bufd);


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

Reply via email to