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 2016 Threads]
The new task notify system seems great and I want to utilize it for fast interrupt to task notifies (with the event group flag mode). However, I'd also like to be able to send/receive queued messages from this same task to other lower priority tasks, for which I'm currently using a queue.
So my question is: how can the task wait on task notifies and the command queue? One thought I have is to just wait on task notifies and create a "RECVQUEUECMD" notify event which can be issued by other tasks after posting a message to the command queue. My question is, if there would be any potential race conditions between submitting the mesage to the queue and the task notify? What I mean, is would it be possible for the task notify to occur before the command has been posted to the queue? Or would the sequence of notify, followed by post to queue be atomic in sequence?
Thanks for any info on this.
Best regards,
Element
Everything will happen sequentially - so if you post to the queue then
send the notification the message will always be in the queue before the
notification unblocks the task.
As you are using the "event group flag mode" perhaps you could use one
of the bits to mean "there is a message in the queue"?
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.