Quality RTOS & Embedded Software

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


Best way to block a task?

Posted by raedbenz on December 7, 2009
I need to run a task after acertain event occurs (e.g. button push)..
so what is more efficient with the minimum cpu overheads and more reliable, to use **vTaskSuspend** from the first call to of the task, or a semaphore with max delay. ?

RE: Best way to block a task?

Posted by Dave on December 7, 2009
Use a binary or counting semaphore with max delay. If you set INCLUDE_vTaskSuspend to 1 in FreeRTOSConfig.h then max delay will be an indefinite delay.

Do not use vTaskSuspend() for event processing. It does not latch events so it is easy to miss them.

[ 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