FreeRTOS-Kernel/include
Darian Leung 62f334a51e change(freertos/smp): Update tasks.c locking
Updated critical section macros with 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.

Co-authored-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
2026-06-24 10:03:22 +02:00
..
atomic.h Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
CMakeLists.txt Fix circular dependency in CMake project (#700) 2023-07-10 15:08:59 -07:00
croutine.h MPLAB PIC32MZ-EF - Adds an assert to catch register overflow (#1265) (#1267) 2025-04-25 17:05:15 +05:30
deprecated_definitions.h Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
event_groups.h event-groups: Fix multiple definitions (#1307) 2025-08-14 10:40:59 -07:00
FreeRTOS.h change(freertos/smp): Update tasks.c locking 2026-06-24 10:03:22 +02:00
list.h - Fixed the wrong pre-processor comment and function parameters 2026-04-23 12:58:23 -07:00
message_buffer.h fix stream/message buffer type and timeout in example 2026-04-21 14:55:29 -07:00
mpu_prototypes.h event-groups: Fix multiple definitions (#1307) 2025-08-14 10:40:59 -07:00
mpu_syscall_numbers.h Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
mpu_wrappers.h Add xQueueCreateSetStatic method for static allocation of Queue Sets (#1228) 2025-01-22 14:53:35 +05:30
newlib-freertos.h Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
picolibc-freertos.h Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
portable.h Disable stack overflow check for MPU ports (#1231) 2025-02-24 21:54:15 +05:30
projdefs.h Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
queue.h Correct minor mistakes in code comments (#1371) 2026-02-20 11:11:15 -08:00
semphr.h Fix datatype of queue item length macros (#1286) 2025-06-30 18:11:30 +05:30
stack_macros.h Revert "FreeRTOS SMP: direct access to current TCB inside stack macros (#1270)" (#1272) 2025-05-05 15:45:15 +05:30
StackMacros.h Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
stdint.readme Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
stream_buffer.h fix stream/message buffer type and timeout in example 2026-04-21 14:55:29 -07:00
task.h change(freertos/smp): Update tasks.c locking 2026-06-24 10:03:22 +02:00
timers.h Update comment in the example for declaration of xTimerReset (#1133) 2024-09-02 21:16:23 +05:30