FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [June 2007 Threads] setting own prioirity using task handlePosted by Glen B. on June 2, 2007 Richard
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; }
Glen
RE: setting own prioirity using task handlePosted by Glen B. on June 20, 2007 Richard
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.
RE: setting own prioirity using task handlePosted by Richard 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.
Regards.
RE: setting own prioirity using task handlePosted by Glen B. 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
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|