Quality RTOS & Embedded Software

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


pxHigherPriorityTaskWoken usage clarification

Posted by rsgrimes on August 11, 2016

Three questions, with a bit of background.

Many of the functions that may be safely called from an ISR have a pointer parameter often named pxHigherPriorityTaskWoken. My understanding is that if this is not NULL, and the associated call causes a higher priority task to unblock, then *pxHigherPriorityTaskWoken will be set true, and the calling ISR should call portYIELDFROMISR() prior to returning to activate the unblocked, higher priority task.

  1. Is this a correct understanding?
  2. If portYIELDFROMISR isn't called, then the task will eventually be unblocked, but not until some other event causes the scheduler to reevalute the ready tasks; is that correct?

Finally, I've noticed that the online API documentation (example: http://www.freertos.org/a00119.html) has changed to add this note to the pxHigherPriorityTaskWoken parameter: > "From FreeRTOS V7.3.0 pxHigherPriorityTaskWoken is an optional parameter and can be set to NULL." 3. If you don't supply this parameter, then you won't be notified of a higher-priority task being woken, so it won't get scheduled as soon as possible; is that the sole effect of not using this parameter? 4.

pxHigherPriorityTaskWoken usage clarification

Posted by richard_damon on August 12, 2016

1) Yes. 2) Yes, for example, the tick interrupt. 3) Yes, It isn't quite 'optional', as you have to provide something, but if you pass a NULL (or a 0) then you just don't get the indication that someone has woken. In effect, when/if it is time to set the flag true, that operation is skipped if you pass a null pointer.

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

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists