mirror of https://github.com/ARMmbed/mbed-os.git
Fix joining a terminated thread
When a thread is terminated signal the join semaphore so any threads joining the terminated thread wake up as expected.pull/2413/head
parent
80b1ff1371
commit
e32b258229
|
@ -104,6 +104,9 @@ osStatus Thread::terminate() {
|
||||||
ret = osThreadTerminate(_tid);
|
ret = osThreadTerminate(_tid);
|
||||||
_tid = (osThreadId)NULL;
|
_tid = (osThreadId)NULL;
|
||||||
|
|
||||||
|
// Wake threads joining the terminated thread
|
||||||
|
_join_sem.release();
|
||||||
|
|
||||||
_mutex.unlock();
|
_mutex.unlock();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue