esp-idf/components/pthread
Kedar Sovani 07992b08e8 [pthread] Perform init_routine execution outside of the mutex
The mutex is common across all the threads. It needn't be held across
the init_routine() call as long as the 'once' behaviour is guaranteed

Saw a deadlock case, where init_routine of one thread was waiting for
the completion of init_routine in another thread.

t2: wait for command
t1: pthread_once:
         lock once_mux
         init_routine:
               inform thread t2
               wait for signal from t2
t2: received command
         pthread_once
             lock once_mux (already held by t1)
---- Deadlock ----
2017-10-25 13:57:39 +05:30
..
test pthreads local storage: add test for unique keys 2017-10-17 15:29:25 +08:00
component.mk pthread: Initial version of thread API 2017-09-06 10:30:23 +08:00
Kconfig Cleanup 2017-09-06 10:30:23 +08:00
pthread_internal.h pthread: Add support for pthread thread local storage 2017-10-17 14:46:08 +08:00
pthread_local_storage.c pthread: Add support for pthread thread local storage 2017-10-17 14:46:08 +08:00
pthread.c [pthread] Perform init_routine execution outside of the mutex 2017-10-25 13:57:39 +05:30