Quality RTOS & Embedded Software

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




Loading

Suspending a task that is in suspended state due to portMAX_DELAY already

Posted by pugglewuggle on December 17, 2015

If I have a task that is in suspended state due to xQueueReceive with portMAX_DELAY already and then I call vTaskSuspend on that task, will that prevent the the task from waking/running even if the queue has an item inserted into it? I just want to make sure I'm clear on this behaviour.


Suspending a task that is in suspended state due to portMAX_DELAY already

Posted by rtel on December 17, 2015

Yes. When a task is in the Blocked state waiting for a message due to an infinite block time, although the internal implementation has the task in the Suspended list, it is still actually in the Blocked state, and as such can be unblocked by data on the queue. When the task is then Suspended, it moves to the real Suspended state, so will not unblock if data arrives on the queue.


Suspending a task that is in suspended state due to portMAX_DELAY already

Posted by pugglewuggle on December 17, 2015

Great, thanks!


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




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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

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