Skip to content

Commit 0e6c868

Browse files
committed
OS/FreeRTOS: Fix task switch interrupt handling in xPortTaskSwitch
- Remove unnecessary portDISABLE_INTERRUPTS/portENABLE_INTERRUPTS calls in xPortTaskSwitch - Add changelog entry documenting the FreeRTOS task switch interrupt handling fix Signed-off-by: Huaqi Fang <578567190@qq.com>
1 parent f9b6ab4 commit 0e6c868

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

OS/FreeRTOS/Source/portable/port.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,15 +519,13 @@ void vPortAssert(int32_t x)
519519

520520
void xPortTaskSwitch(void)
521521
{
522-
portDISABLE_INTERRUPTS();
523522
/* Clear Software IRQ, A MUST */
524523
SysTimer_ClearSWIRQ();
525524
#if ( configNUMBER_OF_CORES > 1 )
526525
vTaskSwitchContext( portGET_CORE_ID() );
527526
#else
528527
vTaskSwitchContext();
529528
#endif
530-
portENABLE_INTERRUPTS();
531529
}
532530
/*-----------------------------------------------------------*/
533531

doc/source/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ This is release version of ``0.9.0`` of Nuclei SDK, which is still under develop
6565
- Add support for **ThreadX SMP** kernel support for both Nuclei RISC-V RV32 and RV64 CPU with ECLIC feature enabled.
6666
- Fix issue where ``tx_thread_run_count`` was not incremented during task switches and initial task creation in the ThreadX kernel.
6767
- Add ECLICv2 hardware context auto-save support for all RTOS including FreeRTOS, RT-Thread, ThreadX and UCOSII when ``ECLIC_HWCTX=1`` and ``XLCFG_ECLIC=2``
68+
- Fix FreeRTOS task switch ``xPortTaskSwitch`` function, interrupt should be disabled during task switch
6869

6970
* Build System
7071

0 commit comments

Comments
 (0)