VirtualBox

Changeset 8669 in vbox for trunk


Ignore:
Timestamp:
May 7, 2008 3:51:13 PM (17 years ago)
Author:
vboxsync
Message:

Use the IN_TREE flag instead of the state just to be on the safe side.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/thread.cpp

    r8661 r8669  
    527527     * Remove it from the tree and mark it as dead.
    528528     *
    529      * Thread that has seen rtThreadTerminate and entered the final TERMINATED
    530      * state does not need removing, probably no thread should require removing
    531      * here. However, be careful making sure that cRefs isn't 0 if we do or we'll
    532      * blow up because the strict locking code will be calling us back.
    533      */
    534     if (pThread->enmState != RTTHREADSTATE_TERMINATED)
     529     * Threads that has seen rtThreadTerminate and should already have been
     530     * removed from the tree. There is probably no thread that  should
     531     * require removing here. However, be careful making sure that cRefs
     532     * isn't 0 if we do or we'll blow up because the strict locking code
     533     * will be calling us back.
     534     */
     535    if (ASMBitTest(&pThread->fIntFlags, RTTHREADINT_FLAG_IN_TREE_BIT))
    535536    {
    536537        ASMAtomicIncU32(&pThread->cRefs);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette