Ignore:
Timestamp:
Feb 24, 2011, 7:49:31 AM (15 years ago)
Author:
Patrick Gansterer
Message:

2011-02-24 Patrick Gansterer <Patrick Gansterer>

Reviewed by Alexey Proskuryakov.

Remove pthreads dependecy for JSLock
https://bugs.webkit.org/show_bug.cgi?id=54832

JSLock is only needed to support an obsolete execution model where JavaScriptCore
automatically protected against concurrent access from multiple threads.
So it's safe to disable it on non-mac platforms where we don't have native pthreads.

  • runtime/JSLock.cpp:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSLock.cpp

    r75443 r79564  
    2525#include "CallFrame.h"
    2626
    27 #if ENABLE(JSC_MULTIPLE_THREADS)
     27#if USE(PTHREADS)
    2828#include <pthread.h>
    2929#endif
     
    3131namespace JSC {
    3232
    33 #if ENABLE(JSC_MULTIPLE_THREADS)
     33// JSLock is only needed to support an obsolete execution model where JavaScriptCore
     34// automatically protected against concurrent access from multiple threads.
     35// So it's safe to disable it on non-mac platforms where we don't have native pthreads.
     36#if ENABLE(JSC_MULTIPLE_THREADS) && (OS(DARWIN) || USE(PTHREADS))
    3437
    3538// Acquire this mutex before accessing lock-related data.
     
    209212}
    210213
    211 #else
     214#else // ENABLE(JSC_MULTIPLE_THREADS) && (OS(DARWIN) || USE(PTHREADS))
    212215
    213216JSLock::JSLock(ExecState*)
     
    256259}
    257260
    258 #endif // USE(MULTIPLE_THREADS)
     261#endif // ENABLE(JSC_MULTIPLE_THREADS) && (OS(DARWIN) || USE(PTHREADS))
    259262
    260263} // namespace JSC
Note: See TracChangeset for help on using the changeset viewer.