esp-idf/components/pthread
Myk Melez 5b4b867a9c 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-30 19:39:17 +08:00
..
include feat(pthread): Pthread can now use PSRAM as stack 2024-01-22 15:33:05 +08:00
test_apps ci: Added missing generic tag to psram tests 2024-04-16 09:17:41 +02: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 refactor(core): reformat newlib and pthread with astyle 2024-02-27 10:00:06 +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-30 19:39:17 +08:00
pthread_rwlock.c refactor(core): reformat newlib and pthread with astyle 2024-02-27 10:00:06 +08:00
pthread_semaphore.c refactor(core): reformat newlib and pthread with astyle 2024-02-27 10:00:06 +08:00
pthread.c refactor(core): reformat newlib and pthread with astyle 2024-02-27 10:00:06 +08:00
sdkconfig.rename pthread: remove ESP32_ prefix from Kconfig options 2019-07-29 04:43:49 +02:00