Ignore:
Timestamp:
Nov 4, 2008, 10:57:01 AM (17 years ago)
Author:
Darin Adler
Message:

2008-11-03 Darin Adler <Darin Adler>

Reviewed by Tim Hatcher.

  • JavaScriptCore.exp: Changed to export functions rather than a global for the atomically initialized static mutex.
  • JavaScriptCore.xcodeproj/project.pbxproj: Added a script phase that runs the check-for-exit-time-destructors script.
  • wtf/MainThread.cpp: (WTF::mainThreadFunctionQueueMutex): Changed to leak an object rather than using an exit time destructor. (WTF::functionQueue): Ditto.
  • wtf/unicode/icu/CollatorICU.cpp: (WTF::cachedCollatorMutex): Ditto.
  • wtf/Threading.h: Changed other platforms to share the Windows approach where the mutex is internal and the functions are exported.
  • wtf/ThreadingGtk.cpp: (WTF::lockAtomicallyInitializedStaticMutex): Ditto. (WTF::unlockAtomicallyInitializedStaticMutex): Ditto.
  • wtf/ThreadingNone.cpp: (WTF::lockAtomicallyInitializedStaticMutex): Ditto. (WTF::unlockAtomicallyInitializedStaticMutex): Ditto.
  • wtf/ThreadingPthreads.cpp: (WTF::threadMapMutex): Changed to leak an object rather than using an exit time destructor. (WTF::lockAtomicallyInitializedStaticMutex): Mutex change. (WTF::unlockAtomicallyInitializedStaticMutex): Ditto. (WTF::threadMap): Changed to leak an object rather than using an exit time destructor.
  • wtf/ThreadingQt.cpp: (WTF::lockAtomicallyInitializedStaticMutex): Mutex change. (WTF::unlockAtomicallyInitializedStaticMutex): Ditto.
  • wtf/ThreadingWin.cpp: (WTF::lockAtomicallyInitializedStaticMutex): Added an assertion.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/ThreadingQt.cpp

    r37040 r38101  
    6565
    6666
    67 Mutex* atomicallyInitializedStaticMutex;
     67static Mutex* atomicallyInitializedStaticMutex;
    6868
    6969static ThreadIdentifier mainThreadIdentifier;
     
    123123void initializeThreading()
    124124{
    125     if(!atomicallyInitializedStaticMutex) {
     125    if (!atomicallyInitializedStaticMutex) {
    126126        atomicallyInitializedStaticMutex = new Mutex;
    127127        threadMapMutex();
     
    135135}
    136136
     137void lockAtomicallyInitializedStaticMutex()
     138{
     139    ASSERT(atomicallyInitializedStaticMutex);
     140    atomicallyInitializedStaticMutex->lock();
     141}
     142
     143void unlockAtomicallyInitializedStaticMutex()
     144{
     145    atomicallyInitializedStaticMutex->unlock();
     146}
     147
    137148ThreadIdentifier createThread(ThreadFunction entryPoint, void* data, const char*)
    138149{
Note: See TracChangeset for help on using the changeset viewer.