9df9018c19e21cda816b8aef9a998e62b4802934 10792 |
|
22-Jul-2008 |
vboxsync |
IPRT: Fixed issue where RTCreateThread would race against the termination of the new thread, if RTCreateThread didn't manage to insert the thread before the new thread completed, we would be inserting a thread into the tree that was terminated and which native ID should not be in the tree. If the OS then reused the native thread ID immediately (OS/2 and now glibc/linux), we would end up with a duplicate in the tree and get all confused. The fix is to check the state in rtThreadInsert and never insert a terminated thread. |