esp-idf/components/pthread
Myk Melez bf7ab2249c fix(pthread): Remove TLS pointer/deletion callback from correct thread
Originally, pthread_internal_local_storage_destructor_callback was only called from pthread_exit
on the thread whose TLS is being destroyed.

In b3755b751e, pthread_internal_local_storage_destructor_callback
started being called from pthread_join and pthread_detach on a different thread (whichever one
called one of those functions).

But pthread_internal_local_storage_destructor_callback is still calling
vTaskSetThreadLocalStoragePointer and vTaskSetThreadLocalStoragePointerAndDelCallback with a NULL
xTaskToSet argument, which causes those functions to set the TLS pointer and deletion callback
for the current thread, not the thread whose TLS is being destroyed.

This commit makes pthread_internal_local_storage_destructor_callback call
vTaskSetThreadLocalStoragePointer and vTaskSetThreadLocalStoragePointerAndDelCallback
with the handle of the thread whose TLS is being destroyed.
2024-07-02 13:33:11 +08:00
..
include refactor: moved semaphore.h to newlib platform_include 2023-08-08 16:45:57 +08:00
test_apps/pthread_unity_tests feat(ci): Enable p4 example, test_apps and unit tests CI build 2023-08-24 12:51:19 +08:00
CMakeLists.txt fix(pthread): fixed pthread_condvar linker hook 2023-09-12 11:17:31 +08:00
Kconfig pthread: remove ESP32_ prefix from Kconfig options 2019-07-29 04:43:49 +02:00
pthread_cond_var.c feat(pthread): added pthread_condattr* stubs to avoid linker errors 2023-09-26 12:17:38 +08:00
pthread_internal.h pthread: Remove pthread TLS cleanup dependency on FreeRTOS Static Task Cleanup Hook 2022-11-02 09:52:28 +01:00
pthread_local_storage.c fix(pthread): Remove TLS pointer/deletion callback from correct thread 2024-07-02 13:33:11 +08:00
pthread_rwlock.c pthread: added pthread_rwlock_tryrd/wrlock() 2023-04-17 16:16:11 +08:00
pthread_semaphore.c pthread: Implemented POSIX unnamed semaphore 2023-03-21 10:23:58 +08:00
pthread.c bugfix(pthread): fixed log related warning 2023-07-19 15:51:56 +08:00
sdkconfig.rename pthread: remove ESP32_ prefix from Kconfig options 2019-07-29 04:43:49 +02:00