Message-ID: <544F6988.1030005@xenomai.org> Date: Tue, 28 Oct 2014 11:01:44 +0100 From: Philippe Gerum MIME-Version: 1.0 References: <544F6117.7070101@bmwedler.de> In-Reply-To: <544F6117.7070101@bmwedler.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] Using pipes in 3.0rc List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Registrierungen , xenomai@xenomai.org On 10/28/2014 10:25 AM, Registrierungen wrote: > Hello, > > i try to switch with my working project from Xenomai 2.6 to 3.0rc > Cobaltusing the native/alchemy skin. > > Creating tasks,etc. seems to works fine. > > If i try to open a pipe from the realtime taks using rt_pipe_create it > returns with the error -88. This is -ENOTSOCK, you can check all error codes there: /usr/include/asm-generic/errno-base.h /usr/include/asm-generic/errno.h ENOTSOCK is not raised by the alchemy API, so this must be a syscall taking the wrong route to the glibc in the core lib. Please try this patch: diff --git a/lib/alchemy/pipe.c b/lib/alchemy/pipe.c index 93da9be..439a00f 100644 --- a/lib/alchemy/pipe.c +++ b/lib/alchemy/pipe.c @@ -166,8 +166,8 @@ int rt_pipe_create(RT_PIPE *pipe, } if (poolsize > 0) { - ret = setsockopt(pcb->sock, SOL_XDDP, XDDP_POOLSZ, - &poolsize, sizeof(poolsize)); + ret = __RT(setsockopt(pcb->sock, SOL_XDDP, XDDP_POOLSZ, + &poolsize, sizeof(poolsize))); if (ret) goto fail_sockopt; } @@ -181,7 +181,7 @@ int rt_pipe_create(RT_PIPE *pipe, memset(&saddr, 0, sizeof(saddr)); saddr.sipc_family = AF_RTIPC; saddr.sipc_port = minor; - ret = bind(sock, (struct sockaddr *)&saddr, sizeof(saddr)); + ret = __RT(bind(sock, (struct sockaddr *)&saddr, sizeof(saddr))); if (ret) goto fail_sockopt; > > Has anything changed handling pipes in 3.0? All user-visible changes are reported here: http://localhost/xenomai/migrating-from-xenomai-2-x-to-3-x/ -- Philippe.