FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [December 2013 Threads] Send broadcast message or semaphore post ...Posted by debugasm on December 14, 2013 Hi,
is there a way to send a "broadcast message" through a queue or "semaphore post" to more than one recipient at the same time, without sending the message to a single recipient with loop (for() or while()) ?
Thanks very much.
debugasm
Send broadcast message or semaphore post ...Posted by rtel on December 14, 2013 You can't do that using a semaphore, but you can using the new event groups implementation. Event groups are not in the current release, but can be obtained from SVN. See https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Source/include/event_groups.h for documentation.
Regards.
Send broadcast message or semaphore post ...Posted by debugasm on December 14, 2013 Just what I needed for use multi-bit syncronize, like as uC-OS-xxx.
For send a message broadcast to multiple "message queue", there is something ?
Thanks very much.
debugasm
Send broadcast message or semaphore post ...Posted by rtel on December 14, 2013 Not directly, but you can create the same effect using event bits to have tasks wait on an event signally a post to a queue, then have each task peek the queue to get the message. You can use the queue overwrite function to have a single message in the queue that is updated by a writer.
The logic of broadcasting a message implies the message is copied individually to every task that is waiting, which is a lengthy and non-deterministic operation (FreeRTOS does not allow lengthy or non-deterministic operations). Without that (just copying the message to a single place) it would create logic problems for the application writer - what would happen if the tasks waiting for the message were of different priorities and the low priority tasks didn't get a chance to run before the message was updated? Etc. One day we may figure out small and deterministic ways of implementing these things without doing things like walking lists with interrupts disabled (or other such thing that is banned from the FreeRTOS implementation) and then provide it in the main code, but I can't say when that will be. Software timers and event bits have similar problems (anything basically that has to service a list of non-determinant length), but we are happy with the solutions we came up with for those, so there is no reason why we would not eventually do the same for broadcast messages. [you are able to do the opposite - that is - have a task wait for messages on multiple queues]
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|