-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit 64e7e45
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 64e7e45Copy full SHA for 64e7e45
File tree
Expand file treeCollapse file tree
1 file changed
+722
-229
lines changedOpen diff view settings
Filter options
Expand file treeCollapse file tree
1 file changed
+722
-229
lines changedOpen diff view settings
0 commit comments