All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Problem with rt_queue
@ 2006-10-16 15:39 mani bhatti
  2006-10-16 15:50 ` Jan Kiszka
  2006-10-16 15:58 ` Philippe Gerum
  0 siblings, 2 replies; 14+ messages in thread
From: mani bhatti @ 2006-10-16 15:39 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]

Hi all
I am trying to broadcast a message to a queue  from a producer by using function 

rt_queue_send(&queue_input, msg,sizeof(TInputData), Q_BROADCAST);

I have two consumers waiting for the data from producer but the problem is producer is not broadcasting actually to all consumers and  at one time if i run both consumers than only one of the consumer receives the data from producer the other consumer receives nothing and remains blank (the consumer which receives data from queue  is not fixed it is arbitrary).If some one has encountered the problem before please advice me in this regard-Thanks all.The producer code is given below

 while(!end){
               rt_task_wait_period();
               void *msg = rt_queue_alloc(&queue_input, sizeof(TInputData));
                if(msg == NULL) {
                        printf("rt_queue_alloc(queue_inout, %d) failed\n",sizeof(TInputData));
                     }
                memcpy(msg, &sendData, sizeof(TInputData));
                int bytesSent = rt_queue_send(&queue_input,msg,sizeof(TInputData), Q_BROADCAST);
                if (bytesSent <= 0) {
                        printf("rt_queue_send(queue_input) failed: %d\n", bytesSent);
                        rt_queue_free(&queue_input, msg);
                }
                sendData.counter++;
        }



 		
---------------------------------
Do you Yahoo!?
 Get on board. You're invited to try the new Yahoo! Mail.

[-- Attachment #2: Type: text/html, Size: 2705 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2006-12-06 16:44 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-16 15:39 [Xenomai-help] Problem with rt_queue mani bhatti
2006-10-16 15:50 ` Jan Kiszka
2006-10-16 15:58 ` Philippe Gerum
2006-10-25 14:34   ` mani bhatti
2006-10-25 22:50     ` Jan Kiszka
2006-10-27 15:13       ` mani bhatti
2006-10-27 16:52         ` Jan Kiszka
2006-10-30 16:08           ` mani bhatti
2006-10-30 17:37             ` Jan Kiszka
2006-12-06 15:04               ` [Xenomai-help] problem persists " mani bhatti
2006-12-06 15:30                 ` [Xenomai-help] " Jan Kiszka
2006-12-06 16:11                   ` mani bhatti
2006-12-06 16:44                     ` Jan Kiszka
2006-10-27 21:23       ` [Xenomai-help] Problem " Philippe Gerum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.