Quality RTOS & Embedded Software

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


Loading

portyield_from_isr() during a vtasksuspendall().

Posted by sreertos on January 14, 2019

I am wondering what would happen in the following scenario.

Task one with lower priority is running, this task has a few lines of resource access code, which i am enlosing in a tasksuspendall - taskresumeall block to prevent context switching during a small portion.Let us say an interrupt occurs during this time ( interrupts not suspended) and I do a portyieldfrom_isr in the ISR .

My question is : what happens if a portyieldfrom _isr() is called during the time when the scheduler has been disabled by the vtasksuspendall() call.


portyield_from_isr() during a vtasksuspendall().

Posted by richard_damon on January 14, 2019

There is code in the portyieldfrom_isr handler to detect that the scheduler has been suspended, and it sets a flag to say that the scheduler needs to be run as soon as the scheduler is resumed.


portyield_from_isr() during a vtasksuspendall().

Posted by rtel on January 14, 2019

If the scheduler is suspended then any attempt to yield will be held pending until such time that the scheduler is unsuspended. That is done in software, so there is no reliance on how the hardware actually performs the yield.


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


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

Latest News

FreeRTOS v10.2.0 is available for immediate download. MIT licensed, and including RISC-V and ARMv8-M (Cortex-M33) demos.

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

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

Cadence Tensilica Cortes

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Mediatek

Renesas

RISC-V

SiFIve RISC-V

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