Changeset 94890 in webkit


Ignore:
Timestamp:
Sep 9, 2011 5:05:28 PM (13 years ago)
Author:
ggaren@apple.com
Message:

2011-09-09 Geoffrey Garen <ggaren@apple.com>

Reviewed by Dan Bernstein.

Removed ENABLE(SINGLE_THREADED) support, since it is always false
https://bugs.webkit.org/show_bug.cgi?id=67862

Next step toward making the baseline platform assumption that threads exist.

  • wtf/wtf.pri:
  • JavaScriptCore.gypi:
  • JavaScriptCore.vcproj/WTF/WTF.vcproj: Removed references to ThreadingNone.cpp, which was only compiled in single-threaded mode.
  • wtf/Platform.h:
  • wtf/ThreadSpecific.h: (WTF::::destroy):
  • wtf/qt/ThreadingQt.cpp: Removed now-dead code.
  • wtf/ThreadingNone.cpp: Removed.

2011-09-09 Geoffrey Garen <ggaren@apple.com>

Reviewed by Dan Bernstein.

Removed ENABLE(SINGLE_THREADED) support, since it is always false
https://bugs.webkit.org/show_bug.cgi?id=67862

Next step toward making the baseline platform assumption that threads exist.

  • WebCore.pri:
  • features.pri:
  • platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::interrupt): Removed now-dead code.
Location:
trunk/Source
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r94875 r94890  
     12011-09-09  Geoffrey Garen  <ggaren@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Removed ENABLE(SINGLE_THREADED) support, since it is always false
     6        https://bugs.webkit.org/show_bug.cgi?id=67862
     7
     8        Next step toward making the baseline platform assumption that threads exist.
     9
     10        * wtf/wtf.pri:
     11        * JavaScriptCore.gypi:
     12        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Removed references to
     13        ThreadingNone.cpp, which was only compiled in single-threaded mode.
     14
     15        * wtf/Platform.h:
     16        * wtf/ThreadSpecific.h:
     17        (WTF::::destroy):
     18        * wtf/qt/ThreadingQt.cpp: Removed now-dead code.
     19
     20        * wtf/ThreadingNone.cpp: Removed.
     21
    1222011-09-09  Mark Hahnenberg  <mhahnenberg@apple.com>
    223
  • trunk/Source/JavaScriptCore/JavaScriptCore.gypi

    r94814 r94890  
    626626            'wtf/ThreadSpecificWin.cpp',
    627627            'wtf/Threading.cpp',
    628             'wtf/ThreadingNone.cpp',
    629628            'wtf/ThreadingPthreads.cpp',
    630629            'wtf/ThreadingWin.cpp',
  • trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj

    r94452 r94890  
    10821082                </File>
    10831083                <File
    1084                         RelativePath="..\..\wtf\ThreadingNone.cpp"
    1085                         >
    1086                 </File>
    1087                 <File
    10881084                        RelativePath="..\..\wtf\ThreadingPrimitives.h"
    10891085                        >
  • trunk/Source/JavaScriptCore/wtf/Platform.h

    r94872 r94890  
    10521052#endif
    10531053
    1054 #if ENABLE(SINGLE_THREADED)
    1055 #undef ENABLE_LAZY_BLOCK_FREEING
    1056 #define ENABLE_LAZY_BLOCK_FREEING 0
    1057 #else
    1058 #define ENABLE_LAZY_BLOCK_FREEING 1
    1059 #endif
    1060 
    10611054#ifndef ENABLE_LARGE_HEAP
    10621055#if CPU(X86) || CPU(X86_64)
     
    11391132#endif
    11401133
    1141 #if !defined(ENABLE_PARALLEL_JOBS) && !ENABLE(SINGLE_THREADED) && (ENABLE(THREADING_GENERIC) || ENABLE(THREADING_LIBDISPATCH) || ENABLE(THREADING_OPENMP))
     1134#if !defined(ENABLE_PARALLEL_JOBS) && (ENABLE(THREADING_GENERIC) || ENABLE(THREADING_LIBDISPATCH) || ENABLE(THREADING_OPENMP))
    11421135#define ENABLE_PARALLEL_JOBS 1
    11431136#endif
  • trunk/Source/JavaScriptCore/wtf/ThreadSpecific.h

    r76248 r94890  
    102102#endif
    103103
    104 #if ENABLE(SINGLE_THREADED)
    105     T* m_value;
    106 #else
    107104#if USE(PTHREADS)
    108105    pthread_key_t m_key;
     
    114111    int m_index;
    115112#endif
    116 #endif
    117113};
    118114
    119 #if ENABLE(SINGLE_THREADED)
    120 template<typename T>
    121 inline ThreadSpecific<T>::ThreadSpecific()
    122     : m_value(0)
    123 {
    124 }
    125 
    126 template<typename T>
    127 inline T* ThreadSpecific<T>::get()
    128 {
    129     return m_value;
    130 }
    131 
    132 template<typename T>
    133 inline void ThreadSpecific<T>::set(T* ptr)
    134 {
    135     ASSERT(!get());
    136     m_value = ptr;
    137 }
    138 #else
    139115#if USE(PTHREADS)
    140116template<typename T>
     
    260236#error ThreadSpecific is not implemented for this platform.
    261237#endif
    262 #endif
    263238
    264239template<typename T>
    265240inline void ThreadSpecific<T>::destroy(void* ptr)
    266241{
    267 #if !ENABLE(SINGLE_THREADED)
    268242    Data* data = static_cast<Data*>(ptr);
    269243
     
    298272#if !PLATFORM(QT)
    299273    delete data;
    300 #endif
    301274#endif
    302275}
  • trunk/Source/JavaScriptCore/wtf/ThreadingNone.cpp

    r55429 r94890  
    1 /*
    2  * Copyright (C) 2007 Apple Inc. All rights reserved.
    3  * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com)
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  *
    9  * 1.  Redistributions of source code must retain the above copyright
    10  *     notice, this list of conditions and the following disclaimer.
    11  * 2.  Redistributions in binary form must reproduce the above copyright
    12  *     notice, this list of conditions and the following disclaimer in the
    13  *     documentation and/or other materials provided with the distribution.
    14  * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
    15  *     its contributors may be used to endorse or promote products derived
    16  *     from this software without specific prior written permission.
    17  *
    18  * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
    19  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    20  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    21  * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
    22  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    23  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    24  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    25  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    26  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    27  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28  */
    29 
    30 #include "config.h"
    31 #include "Threading.h"
    32 
    33 #if ENABLE(SINGLE_THREADED)
    34 
    35 namespace WTF {
    36 
    37 void initializeThreading() { }
    38 ThreadIdentifier createThreadInternal(ThreadFunction, void*, const char*) { return ThreadIdentifier(); }
    39 void initializeCurrentThreadInternal(const char*) { }
    40 int waitForThreadCompletion(ThreadIdentifier, void**) { return 0; }
    41 void detachThread(ThreadIdentifier) { }
    42 ThreadIdentifier currentThread() { return ThreadIdentifier(); }
    43 bool isMainThread() { return true; }
    44 
    45 Mutex::Mutex() { }
    46 Mutex::~Mutex() { }
    47 void Mutex::lock() { }
    48 bool Mutex::tryLock() { return false; }
    49 void Mutex::unlock() { }
    50 
    51 ThreadCondition::ThreadCondition() { }
    52 ThreadCondition::~ThreadCondition() { }
    53 void ThreadCondition::wait(Mutex&) { }
    54 bool ThreadCondition::timedWait(Mutex&, double) { return false; }
    55 void ThreadCondition::signal() { }
    56 void ThreadCondition::broadcast() { }
    57 
    58 void lockAtomicallyInitializedStaticMutex() { }
    59 void unlockAtomicallyInitializedStaticMutex() { }
    60 
    61 } // namespace WebCore
    62 
    63 #endif
  • trunk/Source/JavaScriptCore/wtf/qt/ThreadingQt.cpp

    r91906 r94890  
    3030#include "Threading.h"
    3131
    32 #if !ENABLE(SINGLE_THREADED)
    33 
    3432#include "DateMath.h"
    3533#include "dtoa.h"
     
    297295
    298296#include "ThreadingQt.moc"
    299 
    300 #endif
  • trunk/Source/JavaScriptCore/wtf/wtf.pri

    r94452 r94890  
    3636    wtf/StackBounds.cpp \
    3737    wtf/TCSystemAlloc.cpp \
    38     wtf/ThreadingNone.cpp \
    3938    wtf/Threading.cpp \
    4039    wtf/TypeTraits.cpp \
  • trunk/Source/WebCore/ChangeLog

    r94889 r94890  
     12011-09-09  Geoffrey Garen  <ggaren@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Removed ENABLE(SINGLE_THREADED) support, since it is always false
     6        https://bugs.webkit.org/show_bug.cgi?id=67862
     7
     8        Next step toward making the baseline platform assumption that threads exist.
     9
     10        * WebCore.pri:
     11        * features.pri:
     12        * platform/sql/SQLiteDatabase.cpp:
     13        (WebCore::SQLiteDatabase::interrupt): Removed now-dead code.
     14
    1152011-09-09  Fady Samuel  <fsamuel@chromium.org>
    216
  • trunk/Source/WebCore/WebCore.pri

    r94866 r94890  
    185185            DEFINES += SQLITE_CORE SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE
    186186            CONFIG(release, debug|release): DEFINES *= NDEBUG
    187             contains(DEFINES, ENABLE_SINGLE_THREADED=1): DEFINES += SQLITE_THREADSAFE=0
    188187    } else {
    189188        # Use sqlite3 from the underlying OS
  • trunk/Source/WebCore/features.pri

    r94499 r94890  
    4242    DEFINES -= ENABLE_SVG_FONTS=1
    4343    DEFINES += ENABLE_SVG_FONTS=0
    44 }
    45 
    46 contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
    47     DEFINES+=ENABLE_DATABASE=0 ENABLE_DOM_STORAGE=0 ENABLE_ICONDATABASE=0 ENABLE_WORKERS=0 ENABLE_SHARED_WORKERS=0
    4844}
    4945
  • trunk/Source/WebCore/platform/sql/SQLiteDatabase.cpp

    r86542 r94890  
    108108void SQLiteDatabase::interrupt()
    109109{
    110 #if !ENABLE(SINGLE_THREADED)
    111110    m_interrupted = true;
    112111    while (!m_lockingMutex.tryLock()) {
     
    119118
    120119    m_lockingMutex.unlock();
    121 #endif
    122120}
    123121
Note: See TracChangeset for help on using the changeset viewer.