From: Philippe Gerum <rpm@xenomai.org>
To: mani bhatti <imranbashirbhatti@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Problem with rt_queue
Date: Mon, 16 Oct 2006 17:58:14 +0200 [thread overview]
Message-ID: <1161014295.5131.13.camel@domain.hid> (raw)
In-Reply-To: <20061016153937.54204.qmail@domain.hid>
On Mon, 2006-10-16 at 08:39 -0700, 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
Excerpt from the documentation:
* - Q_BROADCAST causes the message to be sent to all tasks currently
* waiting for messages. [...]
Are both consumers actually aslept on the queue, waiting for a message?
If so, then please send a compilable testcase that reproduces the issue,
with the consumer part, too.
>
> 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.
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
--
Philippe.
next prev parent reply other threads:[~2006-10-16 15:58 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
2006-10-16 15:58 ` Philippe Gerum [this message]
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=1161014295.5131.13.camel@domain.hid \
--to=rpm@xenomai.org \
--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.