FreeRTOS: Change the priority of a task from within an ISR?

URL: http://ehc.ac/p/freertos/discussion/382005/thread/4c7ba356/

URL: http://www.freertos.org/FreeRTOS_Support_Forum_Archive/May_2008/freertos_vTaskPrioritySet_from_an_ISR._2030373.html


Does there exist a way to change the priority of a task from within an ISR?

Thanks,


There is no vTaskPrioritySetFromISR() function but you could create one yourself. I think this would be basically the same as the vTaskPrioritySet() function but with the critical sections removed, and the call to taskYIELD() moved to the end of the function. If a yield was required you would set a flag instead of calling taskYIELD(), then use the taskYIELD_FROM_ISR() function as demonstrated in the examples for your port.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章