A Dimarts, 14 de gener de 2014, Philippe Gerum va escriure: > 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 #<port> > ^ > | > | * input queue: /dev/rtp -> xnpipe > | * output queue: xnpipe -> /dev/rtp > | > v > /dev/rtp<port> > > So, when NRT reads from /dev/rtp<port>, 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.
Ok, in the example the same thread open a device for write and read from the same device. From your answer about the endpoints, I understand that when the NRT open for read, read from the RT world, and when the NRT writes to the RT world. So, could I have a NRT function (thread) that open the device to just read from the RT world and _another_ that send to the RT world? Because I have to one the same device, and I don't know that I could do it at the same time. Regards, Leopold -- -- Linux User 152692 Catalonia -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20140120/e730351a/attachment.sig> _______________________________________________ Xenomai mailing list Xenomai@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai