third_party/virtualbox/src/VBox/Runtime/common/misc/thread.cpp
/**
 * Removes the thread from the AVL tree, call owns the tree lock
 * and has cleared the RTTHREADINT_FLAG_IN_TREE bit.
 *
 * @param   pThread     The thread to remove.
 */
Removes the thread from the AVL tree, call owns the tree lock
and has cleared the RTTHREADINT_FLAG_IN_TREE bit.

@param   pThread     The thread to remove.
Removes the thread from the AVL tree call owns the tree lock and has cleared the RTTHREADINT_FLAG_IN_TREE bit . @param pThread The thread to remove .
static void rtThreadRemoveLocked(PRTTHREADINT pThread)
{
    PRTTHREADINT pThread2 = (PRTTHREADINT)RTAvlPVRemove(&g_ThreadTree, pThread->Core.Key);
#if !defined(RT_OS_OS2) 
    AssertMsg(pThread2 == pThread, ("%p(%s) != %p (%p/%s)\n", pThread2, pThread2  ? pThread2->szName : "<null>",
                                    pThread, pThread->Core.Key, pThread->szName));
#endif
    if (pThread2)
        ASMAtomicDecU32(&g_cThreadInTree);
}
static void rtThreadRemoveLocked ( PRTTHREADINT pThread ) { PRTTHREADINT pThread2 = ( PRTTHREADINT ) RTAvlPVRemove ( & g_ThreadTree , pThread -> Core . Key ) ; #if ! defined ( RT_OS_OS2 ) AssertMsg ( pThread2 == pThread , ( " \n " , pThread2 , pThread2 ? pThread2 -> szName : " " , pThread , pThread -> Core . Key , pThread -> szName ) ) ; #endif if ( pThread2 ) ASMAtomicDecU32 ( & g_cThreadInTree ) ; }
Removes the thread from the AVL tree, call owns the tree lock
 and has cleared the RTTHREADINT_FLAG_IN_TREE bit.
Removes the thread from the AVL tree call owns the tree lock and has cleared the RTTHREADINT_FLAG_IN_TREE bit .
/** @todo this asserts for threads created by NSPR */