The queue is opened with O_CREAT | O_RDWR.
Please note that I sent an updated version of the code that causes the crash - 
the queue in both the mq_send and mq_receive is "link_rq_mq".


-----Original Message-----
From: Gilles Chanteperdrix [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 01, 2006 6:09 PM
To: Landau, Bracha
Cc: [email protected]
Subject: RE: [Xenomai-help] mq_send /mq_receive problem


Landau, Bracha wrote:
 > //*********************************************************
 > // The following is a snippet from the kernel module:
 > // (If the delay is put in, it works fine.)
 > //**********************************************************
 > 
 > static void *LinkThread (struct net_device *dev)
 > {
 >      int status;
 >      link_request linkr;
 > struct timespec ttt,xxx;
 > ttt.tv_sec = 2;
 > ttt.tv_nsec = 0;
 > 
 >      while (1)
 >      {
 >              if ((status=mq_receive (link_rq_mq, (char *)&linkr, sizeof 
 > (linkr), 0)) > 0)
 >              {
 > //nanosleep (&ttt, &xxx);
 >                      status = mq_send (link_rq_mq_out, (char *)&linkr, 
 > sizeof (linkr), 0);
 >              }
 >      }
 >      return 0;
 > }

What are the flags passed to mq_open ? If for example O_NONBLOCK is set,
then the behaviour you observe is normal.

-- 


                                            Gilles Chanteperdrix.
***********************************************************************************
This email message and any attachments thereto are intended only for use by the 
addressee(s) named above, and may contain legally privileged and/or 
confidential information. If the reader of this message is not the intended 
recipient, or the employee or agent responsible to deliver it to the intended 
recipient, you are hereby notified that any dissemination, distribution or 
copying of this communication is strictly prohibited. If you have received this 
communication in error, please immediately notify the [EMAIL PROTECTED] and 
destroy the original message.
***********************************************************************************

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to