Waiting on task notifies and a queue

jgreen wrote on Thursday, December 01, 2016:

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 “RECV_QUEUE_CMD” 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,


rtel wrote on Thursday, December 01, 2016:

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”?