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


setting own prioirity using task handle

Posted by *anonymous on June 2, 2007


Quite some time ago I think you added the following code to vTaskDelete() at my request. This was to allow a task to properly delete itself by passing its own task handle rather than NULL. I think a similar addition should be added in to vTaskPrioritySet().

/* Ensure a yield is performed if the current task is being deleted. */ if( pxTaskToDelete == pxCurrentTCB ) { __pxTaskToDelete = NULL; }


setting own prioirity using task handle

Posted by *anonymous on June 20, 2007


I have seen no response to this.

If that means you intend to do it great.

If it means that you do not, then I think you should re-consider. Currently, if a thread lowers its own priority using its own task handle rather than NULL, and the new priority is lower than the priority of the next higher priority ready task, then it will continue running until the next context switch even though it is not the highest priority task. This would have to be considered a bug in the kernel.

setting own prioirity using task handle

Posted by richardbarry on June 20, 2007

Hi Glen, I didn't realise you were waiting for a reply.  Thanks for drawing my attention to this.  It is actually something that was highlighted during the SafeRTOS analysis, and to be honest I cannot remember why I did not migrate the change into the FreeRTOS.org code too.  I cannot think of why the change shouldn't be implemented.


setting own prioirity using task handle

Posted by *anonymous on June 21, 2007

No problem. I just wanted to be sure I didn't leave this hanging without being properly understood.

I was curious about whether it had slipped by into SafeRTOS. It is encouraging to hear that the analysis was thorough enough to catch something like this.

Cheers Glen

[ 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