Non-blocking message_queue_send
Joel Sherrill
joel at rtems.org
Fri Feb 12 16:10:09 UTC 2016
On Fri, Feb 12, 2016 at 9:40 AM, Isaac Gutekunst <isaac.gutekunst at vecna.com>
wrote:
> Hi All,
>
> I have an application where having a non-blocking rtems_message_queue_send
> would be useful.
>
>
> I will have multiple producers and a single consumer task wise, so using
> rtems_message_queue_get_number_pending as method to determine if the next
> send will succeed won't work.
>
> Has anyone had a similar problem before?
>
>
> I'm thinking I can wrap all calls to this message queue with a counting
> semaphore and use that to arbitrate. Any other suggestions?
>
>
rtems_message_queue_send() does not block at all. Either the message can be
enqueued or you get a message queue full error.
POSIX message queues can optionally block on the mq_send() but not Classic
API message queues.
Am I missing your use case? Or did you misinterpret something?
--joel
> Isaac
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20160212/aecde1a6/attachment-0002.html>
More information about the users
mailing list