Quality RTOS & Embedded Software

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


Loading

details in xTaskResumeFromISR

Posted by Yuhui Lin on July 27, 2010
In the implementation of xTaskResumeFromISR, it checks the state of scheduler. If the scheduler is not locked, it will change suspended list and ready list directly, otherwise only put the task, which is to be resume, in xPendingReadyList.

I don't understand what's the main concern for the state of scheduler, since this operation should be called from ISR.

RE: details in xTaskResumeFromISR

Posted by Richard Damon on July 27, 2010
There are some point in the kernel which manipulate the scheduler state, which rather than disable interrupts for an extended period of time, will just disable the scheduler. If the interrupt routine attempted to change the state of a task, this could cause a corruption of the scheduler, so the need to move the task to the ready list is noted and handled after the original operation is completed.

RE: details in xTaskResumeFromISR

Posted by Yuhui Lin on July 27, 2010
Thanks richard!

I've got another question. Following is one comment in funciotn xTaskIsTaskSuspended:
/* Is it in the suspended list because it is in the
Suspended state? It is possible to be in the suspended
list because it is blocked on a task with no timeout
specified.
*/

This scenario sounds reasonable. My question is what's the entry function for this scenario? I searched for xSuspendedTaskList in task.c file. I can't find relevent operations which may results in a blocked task stay in suspended queue. As the global varible xSuspendedTaskList is static, functions outside task.c file would not access it.

RE: details in xTaskResumeFromISR

Posted by Richard Damon on July 27, 2010
With a quick check of the source code, the function vTaskPlaceOnEventList check for indefinite timeouts and places these tasks on the suspended task list instead of the delayed task list. (so the task isn't automatically awakened after a period of time). Thus any call to a blocking function with a timeout delay of portMAX_DELAY that does block, will put the task on the xSuspendedTaskList (and will be removed when the block ends).


[ 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.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

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.


Careers

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

Renesas

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