Quality RTOS & Embedded Software

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




Loading

FreeRTOS kernel code problem

Posted by zhudinum1 on November 18, 2013

why use variable xPendingReadyList in the source code ? it can insert ready task into readylist directly without causing any safe problems. very appreciate for your answering in time!


FreeRTOS kernel code problem

Posted by richardbarry on November 18, 2013

xPendingReadyList is used to temporarily hold tasks that have been moved into the Ready state by an interrupt while the scheduler was locked. Its use allows interrupts to remain enabled when the scheduler is locked. Scheduler locking is a lighter form of critical section that prevents the kernel from performing context switches. The alternative is to use a full critical section, but that would mean at least a subset of interrupt priorities would be masked.

Regards.


FreeRTOS kernel code problem

Posted by zhudinum1 on November 19, 2013

Ok thank you! But why we can not insert the tasks that have been moved into the Ready into the pxReadyTasksLists directly while the scheduler was locked? In the security considerations ?

Regards


FreeRTOS kernel code problem

Posted by richard_damon on November 19, 2013

Locking the scheduler is one way to implement a critical section when internal state is being manipulated. If the task that locked the schedule is doing something to the ready list, the LAST thing you want to do is manipulate it yourself, the like result is a corrupted list.


FreeRTOS kernel code problem

Posted by zhudinum1 on November 19, 2013

Ok i konw! Thank you very much!


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




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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