Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Waiting on task notifies and a queue

Posted by jgreen on December 1, 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 "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,


Waiting on task notifies and a queue

Posted by rtel on December 1, 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"?

[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers


STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner