X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/9dae56ea45a0f5f8136a5c93d6f3a7f99399ca73..f9bf01c6616d5ddcf65b13b33cedf9e387ff7a63:/wtf/ThreadingNone.cpp diff --git a/wtf/ThreadingNone.cpp b/wtf/ThreadingNone.cpp index 0be2a4b..2e8a259 100644 --- a/wtf/ThreadingNone.cpp +++ b/wtf/ThreadingNone.cpp @@ -30,13 +30,16 @@ #include "config.h" #include "Threading.h" +#if ENABLE(SINGLE_THREADED) + namespace WTF { void initializeThreading() { } -ThreadIdentifier createThreadInternal(ThreadFunction, void*, const char*) { return 0; } +ThreadIdentifier createThreadInternal(ThreadFunction, void*, const char*) { return ThreadIdentifier(); } +void initializeCurrentThreadInternal(const char*) { } int waitForThreadCompletion(ThreadIdentifier, void**) { return 0; } void detachThread(ThreadIdentifier) { } -ThreadIdentifier currentThread() { return 0; } +ThreadIdentifier currentThread() { return ThreadIdentifier(); } bool isMainThread() { return true; } Mutex::Mutex() { } @@ -47,8 +50,8 @@ void Mutex::unlock() { } ThreadCondition::ThreadCondition() { } ThreadCondition::~ThreadCondition() { } -void ThreadCondition::wait(Mutex& mutex) { } -bool ThreadCondition::timedWait(Mutex& mutex, double absoluteTime) { return false; } +void ThreadCondition::wait(Mutex&) { } +bool ThreadCondition::timedWait(Mutex&, double) { return false; } void ThreadCondition::signal() { } void ThreadCondition::broadcast() { } @@ -56,3 +59,5 @@ void lockAtomicallyInitializedStaticMutex() { } void unlockAtomicallyInitializedStaticMutex() { } } // namespace WebCore + +#endif