Quality RTOS & Embedded Software

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



Posted by jinx on April 16, 2010
I was looking at the example on vTaskSetApplicationTaskTag() in the FreeRTOS reference manual and I have a question about the last line in that example (Listing 42):

#define traceTASK_SWITCHED_OUT() xTaskCAllApplicationTaskHook( pxCurrentTCB, 0)

This #define, as I understand it, globally enables all tasks to run their defined registered callbacks. Am I correct? If so, what about tasks that do not define a callback? Does the kernel 'ignore' calling the task-hooks of those asks that do not define the hook callbacks or does it force all tasks to define the hook-callbacks?

RE: vTaskSetApplicationTaskTag()

Posted by Dave on April 16, 2010
If pxCurrentTCB does not have a tag defined then xTaskCallApplicationTaskHook() will return pdFAIL. It is safe.

[ 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