Ignore:
Timestamp:
Dec 11, 2009, 10:30:47 PM (15 years ago)
Author:
[email protected]
Message:

Allow WTFs concept of the main thread to differ from pthreads when necessary.

Reviewed by Anders Carlsson.

  • wtf/ThreadingPthreads.cpp:

(WTF::initializeThreading):
(WTF::isMainThread):

  • wtf/mac/MainThreadMac.mm:

(WTF::initializeMainThreadPlatform):
(WTF::scheduleDispatchFunctionsOnMainThread):

File:
1 edited

Legend:

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

    r51211 r52046  
    5656static Mutex* atomicallyInitializedStaticMutex;
    5757
    58 #if !PLATFORM(DARWIN) || PLATFORM(CHROMIUM)
     58#if !PLATFORM(DARWIN) || PLATFORM(CHROMIUM) || USE(WEB_THREAD)
    5959static pthread_t mainThread; // The thread that was the first to call initializeThreading(), which must be the main thread.
    6060#endif
     
    7272        threadMapMutex();
    7373        initializeRandomNumberGenerator();
    74 #if !PLATFORM(DARWIN) || PLATFORM(CHROMIUM)
     74#if !PLATFORM(DARWIN) || PLATFORM(CHROMIUM) || USE(WEB_THREAD)
    7575        mainThread = pthread_self();
    7676#endif
     
    230230bool isMainThread()
    231231{
    232 #if PLATFORM(DARWIN) && !PLATFORM(CHROMIUM)
     232#if PLATFORM(DARWIN) && !PLATFORM(CHROMIUM) && !USE(WEB_THREAD)
    233233    return pthread_main_np();
    234234#else
Note: See TracChangeset for help on using the changeset viewer.