FreeRTOS-Kernel/portable/ThirdParty/GCC/Posix
Gaurav-Aggarwal-AWS 32e581636f
Delete thread key on process exit (#1297)
Previously, the shared thread key was deleted in xPortStartScheduler
after scheduler was ended. This created a race condition where
prvThreadKeyDestructor (responsible for freeing thread-specific heap
memory) would not be called if xPortStartScheduler deleted the key
before the last task deletion, as destructors are not invoked after key
deletion (see https://github.com/walac/glibc/blob/master/nptl/pthread_create.c#L145-L150).

Move thread key deletion to process exit to ensure all thread-specific
memory is properly freed.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2025-07-24 11:07:27 +05:30
..
utils Mark mutex as robust to prevent deadlocks (#1233) 2025-01-29 07:27:30 +05:30
FreeRTOS-simulator-for-Linux.url Normalize line endings and whitespace in source files 2022-11-29 15:38:47 -08:00
port.c Delete thread key on process exit (#1297) 2025-07-24 11:07:27 +05:30
portmacro.h Fix spelling typos (#1168) 2024-11-01 10:09:49 -07:00