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] [July 2016 Threads] TaskNotification or Event groupsPosted by rrrum on July 13, 2016 Hello,
I would like to ask for a opinion, it is a design issue and I am not able to find among many different mechanisms the right one for my task:
Let’s focus on 3 tasks, A, B1, B2
Task A is implemented as follows: waits on its “command queue” and there is also timeout set to allow it to run periodically to do some work if no commands are present.
Task A is controlling also B1 and B2, at some point task A writes to receive queues of B1 and B2 which unblock and B1 or B2 or both run
Each task B1 and B2 should set some flag, showing task is running
It can take undefined amount of time to complete B1 or B2, when completed, each task resets its “running flag”
Now task A, at some point in the “periodic” run section, should check if tasks B1 and B2 completed their job (running flag not set), if both are finished it should perform some action, otherwise is should just continue executing periodic stuff.
So I wonder if task notification mechanism or event groups can be used for this purpose or what is the most suitable/efficient mechanism for this design problem.
Thank you
rum
TaskNotification or Event groupsPosted by hs2sf on July 14, 2016 IMO notifications should be sufficient for this design. I've developed a pretty similar system purely using notifications b/c they are by far the fastest and smallest IPC mechanism available in FreeRTOS (you can disable almost all other OS features).
I think event_groups are an overkill.
But if you're a lucky boy having no constraints regarding performance and code size you can choose the most convenient IPC :)
Good luck !
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|