Skip to content

Commit 64e7e45

Browse files
Dazza0sudeep-mohanty
authored andcommitted
change(freertos/smp): Update tasks.c locking
Replaced critical section macros with data group locking macros such as taskENTER/EXIT_CRITICAL() with taskLOCK/UNLOCK_DATA_GROUP(). Also added taskLOCK/UNLOCK_KERNEL_DATA_GROUP() for granular locks. Some tasks.c API relied on their callers to enter critical sections. This assumption no longer works under granular locking. Critical sections added to the following functions: - `vTaskInternalSetTimeOutState()` - `xTaskIncrementTick()` - `vTaskSwitchContext()` - `xTaskRemoveFromEventList()` - `vTaskInternalSetTimeOutState()` - `eTaskConfirmSleepModeStatus()` - `xTaskPriorityDisinherit()` - `pvTaskIncrementMutexHeldCount()` Added missing suspensions to the following functions: - `vTaskPlaceOnEventList()` - `vTaskPlaceOnUnorderedEventList()` - `vTaskPlaceOnEventListRestricted()` Fixed the locking in vTaskSwitchContext() vTaskSwitchContext() must aquire both kernel locks, viz., task lock and ISR lock. This is because, vTaskSwitchContext() can be called from either task context or ISR context. Also, vTaskSwitchContext() must not alter the interrupt state prematurely.
1 parent 4ee913c commit 64e7e45

File tree

1 file changed

+722
-229
lines changed

1 file changed

+722
-229
lines changed

0 commit comments

Comments
 (0)