Commit 41cc2535 authored by ggaren@apple.com's avatar ggaren@apple.com

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.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94890 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c43a7d1c
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 Mark Hahnenberg <mhahnenberg@apple.com>
Unzip initialization lists and constructors in JSCell hierarchy (5/7)
......
......@@ -625,7 +625,6 @@
'wtf/ThreadIdentifierDataPthreads.h',
'wtf/ThreadSpecificWin.cpp',
'wtf/Threading.cpp',
'wtf/ThreadingNone.cpp',
'wtf/ThreadingPthreads.cpp',
'wtf/ThreadingWin.cpp',
'wtf/TypeTraits.cpp',
......
......@@ -1080,10 +1080,6 @@
RelativePath="..\..\wtf\Threading.h"
>
</File>
<File
RelativePath="..\..\wtf\ThreadingNone.cpp"
>
</File>
<File
RelativePath="..\..\wtf\ThreadingPrimitives.h"
>
......
......@@ -1051,13 +1051,6 @@
#endif
#endif
#if ENABLE(SINGLE_THREADED)
#undef ENABLE_LAZY_BLOCK_FREEING
#define ENABLE_LAZY_BLOCK_FREEING 0
#else
#define ENABLE_LAZY_BLOCK_FREEING 1
#endif
#ifndef ENABLE_LARGE_HEAP
#if CPU(X86) || CPU(X86_64)
#define ENABLE_LARGE_HEAP 1
......@@ -1138,7 +1131,7 @@
#define ENABLE_THREADING_OPENMP 1
#endif
#if !defined(ENABLE_PARALLEL_JOBS) && !ENABLE(SINGLE_THREADED) && (ENABLE(THREADING_GENERIC) || ENABLE(THREADING_LIBDISPATCH) || ENABLE(THREADING_OPENMP))
#if !defined(ENABLE_PARALLEL_JOBS) && (ENABLE(THREADING_GENERIC) || ENABLE(THREADING_LIBDISPATCH) || ENABLE(THREADING_OPENMP))
#define ENABLE_PARALLEL_JOBS 1
#endif
......
......@@ -101,9 +101,6 @@ private:
};
#endif
#if ENABLE(SINGLE_THREADED)
T* m_value;
#else
#if USE(PTHREADS)
pthread_key_t m_key;
#elif PLATFORM(QT)
......@@ -113,29 +110,8 @@ private:
#elif OS(WINDOWS)
int m_index;
#endif
#endif
};
#if ENABLE(SINGLE_THREADED)
template<typename T>
inline ThreadSpecific<T>::ThreadSpecific()
: m_value(0)
{
}
template<typename T>
inline T* ThreadSpecific<T>::get()
{
return m_value;
}
template<typename T>
inline void ThreadSpecific<T>::set(T* ptr)
{
ASSERT(!get());
m_value = ptr;
}
#else
#if USE(PTHREADS)
template<typename T>
inline ThreadSpecific<T>::ThreadSpecific()
......@@ -259,12 +235,10 @@ inline void ThreadSpecific<T>::set(T* ptr)
#else
#error ThreadSpecific is not implemented for this platform.
#endif
#endif
template<typename T>
inline void ThreadSpecific<T>::destroy(void* ptr)
{
#if !ENABLE(SINGLE_THREADED)
Data* data = static_cast<Data*>(ptr);
#if USE(PTHREADS)
......@@ -298,7 +272,6 @@ inline void ThreadSpecific<T>::destroy(void* ptr)
#if !PLATFORM(QT)
delete data;
#endif
#endif
}
template<typename T>
......
/*
* Copyright (C) 2007 Apple Inc. All rights reserved.
* Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "Threading.h"
#if ENABLE(SINGLE_THREADED)
namespace WTF {
void initializeThreading() { }
ThreadIdentifier createThreadInternal(ThreadFunction, void*, const char*) { return ThreadIdentifier(); }
void initializeCurrentThreadInternal(const char*) { }
int waitForThreadCompletion(ThreadIdentifier, void**) { return 0; }
void detachThread(ThreadIdentifier) { }
ThreadIdentifier currentThread() { return ThreadIdentifier(); }
bool isMainThread() { return true; }
Mutex::Mutex() { }
Mutex::~Mutex() { }
void Mutex::lock() { }
bool Mutex::tryLock() { return false; }
void Mutex::unlock() { }
ThreadCondition::ThreadCondition() { }
ThreadCondition::~ThreadCondition() { }
void ThreadCondition::wait(Mutex&) { }
bool ThreadCondition::timedWait(Mutex&, double) { return false; }
void ThreadCondition::signal() { }
void ThreadCondition::broadcast() { }
void lockAtomicallyInitializedStaticMutex() { }
void unlockAtomicallyInitializedStaticMutex() { }
} // namespace WebCore
#endif
......@@ -29,8 +29,6 @@
#include "config.h"
#include "Threading.h"
#if !ENABLE(SINGLE_THREADED)
#include "DateMath.h"
#include "dtoa.h"
#include "CurrentTime.h"
......@@ -296,5 +294,3 @@ void ThreadCondition::broadcast()
} // namespace WebCore
#include "ThreadingQt.moc"
#endif
......@@ -35,7 +35,6 @@ SOURCES += \
wtf/SHA1.cpp \
wtf/StackBounds.cpp \
wtf/TCSystemAlloc.cpp \
wtf/ThreadingNone.cpp \
wtf/Threading.cpp \
wtf/TypeTraits.cpp \
wtf/WTFThreadData.cpp \
......
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.
2011-09-09 Fady Samuel <fsamuel@chromium.org>
Move pageScaleFactor code from Frame.{h|cpp} to Page.{h|cpp}
......@@ -184,7 +184,6 @@ contains(DEFINES, ENABLE_SQLITE=1) {
INCLUDEPATH += $${SQLITE3SRCDIR}
DEFINES += SQLITE_CORE SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE
CONFIG(release, debug|release): DEFINES *= NDEBUG
contains(DEFINES, ENABLE_SINGLE_THREADED=1): DEFINES += SQLITE_THREADSAFE=0
} else {
# Use sqlite3 from the underlying OS
CONFIG(QTDIR_build) {
......
......@@ -43,10 +43,6 @@ isEmpty(HAVE_QRAWFONT) {
DEFINES += ENABLE_SVG_FONTS=0
}
contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
DEFINES+=ENABLE_DATABASE=0 ENABLE_DOM_STORAGE=0 ENABLE_ICONDATABASE=0 ENABLE_WORKERS=0 ENABLE_SHARED_WORKERS=0
}
# turn off SQLITE support if we do not have sqlite3 available
!CONFIG(QTDIR_build):win32-*:!exists( $${SQLITE3SRCDIR}/sqlite3.c ): DEFINES += ENABLE_SQLITE=0 ENABLE_DATABASE=0 ENABLE_WORKERS=0 ENABLE_SHARED_WORKERS=0 ENABLE_ICONDATABASE=0 ENABLE_OFFLINE_WEB_APPLICATIONS=0 ENABLE_DOM_STORAGE=0
......
......@@ -107,7 +107,6 @@ void SQLiteDatabase::close()
void SQLiteDatabase::interrupt()
{
#if !ENABLE(SINGLE_THREADED)
m_interrupted = true;
while (!m_lockingMutex.tryLock()) {
MutexLocker locker(m_databaseClosingMutex);
......@@ -118,7 +117,6 @@ void SQLiteDatabase::interrupt()
}
m_lockingMutex.unlock();
#endif
}
bool SQLiteDatabase::isInterrupted()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment