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/2392/head
parent
0712b8adf6
commit
e44ab35c42
|
@ -104,6 +104,9 @@ osStatus Thread::terminate() {
|
|||
ret = osThreadTerminate(_tid);
|
||||
_tid = (osThreadId)NULL;
|
||||
|
||||
// Wake threads joining the terminated thread
|
||||
_join_sem.release();
|
||||
|
||||
_mutex.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue