diff options
Diffstat (limited to 'src/chthreads.c')
-rw-r--r-- | src/chthreads.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/chthreads.c b/src/chthreads.c index 4b61fe964..c41e3af6b 100644 --- a/src/chthreads.c +++ b/src/chthreads.c @@ -34,6 +34,9 @@ Thread *init_thread(Thread *tp, tprio_t prio) { tp->p_flags = P_MEM_MODE_STATIC; tp->p_prio = prio; tp->p_state = PRSUSPENDED; +#ifdef CH_USE_NESTED_LOCKS + tp->p_locks = 0; +#endif #ifdef CH_USE_MUTEXES /* realprio is the thread's own, non-inherited, priority */ tp->p_realprio = prio; |