From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <52D54836.3070203@xenomai.org> Date: Tue, 14 Jan 2014 15:22:46 +0100 From: Philippe Gerum MIME-Version: 1.0 References: <201401141315.38870.leo@alaxarxa.net> In-Reply-To: <201401141315.38870.leo@alaxarxa.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] xddp port questions List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leopold Palomo-Avellaneda , xenomai@xenomai.org On 01/14/2014 01:15 PM, Leopold Palomo-Avellaneda wrote: > Hi, > > in the example xddp-label a two realtime task are connected with a non- > realtime time. They share the same port where one rt task receive from the > non-rt task and the other send to rt-task. > > The regular thread read and write in the same devname > (/proc/xenomai/registry/rtipc/xddp/XDDP_PORT_LABEL). One rt thread listen from > that port. > > I don't understand how is possible that both (non-rt and rt threads) listen > from the same port and could not have collisions if two threads (non-rt and > rt) try to write in the same port. > > Could not be better to separate it? > No, that would defeat the purpose of the illustration. XDDP is a wrapper over Xenomai's message pipe support, offering a socket-based interface to applications. Each XDDP port is mapped to a given /dev/rtp device minor, but the communication endpoints between RT and NRT are different internally. [XDDP-port] <---> xnpipe # ^ | | * input queue: /dev/rtp -> xnpipe | * output queue: xnpipe -> /dev/rtp | v /dev/rtp So, when NRT reads from /dev/rtp, it does not actually listen to the same endpoint/queue than RT, because message pipes are bi-directional. Likewise, NRT and RT never write to the same queue, since the purpose of message pipes is to cross the RT/NRT domain boundary. -- Philippe.