Niklaus Giger wrote:
> Am Samstag, 17. Juni 2006 19:53 schrieb Gilles Chanteperdrix:
> > Niklaus Giger wrote:
> > > Hi
> > >
> > > Here the reworked patch.
> > >
> > > vxWorks supports empty messages. Only one at a time can be received.
> > Could you explain a bit more "Only one at a time can be received" ? I do
> > not get it. You mean that one message get lost if posting two null
> > length messages while two receivers are blocked in a call to msgQReceive
> > ?
> I have two testcases for the 0 length messages. Look in my patch for "Test
> mailbox with 0 length messages". They are:
> a) Post two messages, then call twice msgQReceive and each time I get one
> message back. Each time verified using msgQNumMsgs.
> b) Post two messages, then try to receive two messages at once by giving 2
> (bytes) to msgQReceive see line:
> rc = msgQReceive(qid,(char *)&msg,2,NO_WAIT);)
> In this case I only get one message back, as msgQNumMsgs reports 1.
> This explains the lines:
> rc = msgQNumMsgs(qid);
> TEST_ASSERT(rc == 1);
The current implementation of message queues in vxworks skin does not
support anything like "receive two messages at once". Are you sure
vxworks does for non null messages ?
Xenomai-core mailing list