All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: mani bhatti <imranbashirbhatti@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Problem with rt_queue
Date: Mon, 16 Oct 2006 17:50:08 +0200	[thread overview]
Message-ID: <4533AA30.5020001@domain.hid> (raw)
In-Reply-To: <20061016153937.54204.qmail@domain.hid>

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

mani bhatti wrote:
> 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++;
>         }
> 

May I cite myself?

https://mail.gna.org/public/xenomai-help/2006-10/msg00032.html

Don't get me wrong, your observation might very well have revealed a
Xenomai bug, but it is *far* easier for us poor hackers to analyse and
discuss the issue based on *common* test code.

Thanks,
Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

  reply	other threads:[~2006-10-16 15:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-16 15:39 [Xenomai-help] Problem with rt_queue mani bhatti
2006-10-16 15:50 ` Jan Kiszka [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4533AA30.5020001@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=imranbashirbhatti@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.