mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #2392 from c1728p9/fix_terminate_join
Fix joining a terminated threadpull/2400/head
commit
91ff73d545
|
@ -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