VirtualBox

Changeset 30531 in vbox


Ignore:
Timestamp:
Jun 30, 2010 3:23:56 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
63239
Message:

crOpenGL: terminate sync thread properly on linux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/load.c

    r30530 r30531  
    373373#endif
    374374
    375 #if defined(WINDOWS) && defined(CR_NEWWINTRACK)
     375#if defined(CR_NEWWINTRACK)
    376376    crUnlockMutex(mutex);
     377# if defined(WINDOWS)
    377378    if (RTThreadGetState(stub.hSyncThread)!=RTTHREADSTATE_TERMINATED)
    378379    {
     
    387388        }
    388389    }
     390#else
     391    ASMAtomicWriteBool(&stub.bShutdownSyncThread, true);
     392    {
     393        /*RTThreadWait might return too early, which cause our code being unloaded while RT thread wrapper is still running*/
     394        int rc = pthread_join(RTThreadGetNative(stub.hSyncThread), NULL);
     395        if (!rc)
     396        {
     397            crDebug("pthread_join failed %i", rc);
     398        }
     399    }
     400#endif
    389401    crLockMutex(mutex);
    390402#endif
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