Diff
Modified: trunk/Source/WTF/ChangeLog (161059 => 161060)
--- trunk/Source/WTF/ChangeLog 2013-12-24 21:00:30 UTC (rev 161059)
+++ trunk/Source/WTF/ChangeLog 2013-12-24 21:06:22 UTC (rev 161060)
@@ -1,3 +1,21 @@
+2013-12-24 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r160959.
+ http://trac.webkit.org/changeset/160959
+ https://bugs.webkit.org/show_bug.cgi?id=126222
+
+ Caused Windows build to fail (Requested by rfong on #webkit).
+
+ * wtf/ByteSpinLock.h:
+ (WTF::ByteSpinLock::lock):
+ * wtf/Threading.h:
+ * wtf/ThreadingPrimitives.h:
+ (WTF::pauseBriefly):
+ * wtf/ThreadingPthreads.cpp:
+ (WTF::yield):
+ * wtf/ThreadingWin.cpp:
+ (WTF::yield):
+
2013-12-23 Benjamin Poulain <[email protected]>
Fix the build after r161031
Modified: trunk/Source/WTF/wtf/ByteSpinLock.h (161059 => 161060)
--- trunk/Source/WTF/wtf/ByteSpinLock.h 2013-12-24 21:00:30 UTC (rev 161059)
+++ trunk/Source/WTF/wtf/ByteSpinLock.h 2013-12-24 21:06:22 UTC (rev 161060)
@@ -26,11 +26,11 @@
#ifndef ByteSpinLock_h
#define ByteSpinLock_h
-#include <thread>
#include <wtf/Assertions.h>
#include <wtf/Atomics.h>
#include <wtf/Locker.h>
#include <wtf/Noncopyable.h>
+#include <wtf/ThreadingPrimitives.h>
namespace WTF {
@@ -45,7 +45,7 @@
void lock()
{
while (!weakCompareAndSwap(&m_lock, 0, 1))
- std::this_thread::yield();
+ pauseBriefly();
memoryBarrierAfterLock();
}
Modified: trunk/Source/WTF/wtf/Threading.h (161059 => 161060)
--- trunk/Source/WTF/wtf/Threading.h 2013-12-24 21:00:30 UTC (rev 161059)
+++ trunk/Source/WTF/wtf/Threading.h 2013-12-24 21:06:22 UTC (rev 161060)
@@ -100,6 +100,8 @@
WTF_EXPORT_PRIVATE int waitForThreadCompletion(ThreadIdentifier);
WTF_EXPORT_PRIVATE void detachThread(ThreadIdentifier);
+WTF_EXPORT_PRIVATE void yield();
+
WTF_EXPORT_PRIVATE void lockAtomicallyInitializedStaticMutex();
WTF_EXPORT_PRIVATE void unlockAtomicallyInitializedStaticMutex();
@@ -110,5 +112,6 @@
using WTF::currentThread;
using WTF::detachThread;
using WTF::waitForThreadCompletion;
+using WTF::yield;
#endif // Threading_h
Modified: trunk/Source/WTF/wtf/ThreadingPrimitives.h (161059 => 161060)
--- trunk/Source/WTF/wtf/ThreadingPrimitives.h 2013-12-24 21:00:30 UTC (rev 161059)
+++ trunk/Source/WTF/wtf/ThreadingPrimitives.h 2013-12-24 21:06:22 UTC (rev 161060)
@@ -130,12 +130,22 @@
WTF_EXPORT_PRIVATE DWORD absoluteTimeToWaitTimeoutInterval(double absoluteTime);
#endif
+inline void pauseBriefly()
+{
+#if OS(WINDOWS)
+ Sleep(0);
+#else
+ sched_yield();
+#endif
+}
+
} // namespace WTF
using WTF::Mutex;
using WTF::MutexLocker;
using WTF::MutexTryLocker;
using WTF::ThreadCondition;
+using WTF::pauseBriefly;
#if OS(WINDOWS)
using WTF::absoluteTimeToWaitTimeoutInterval;
Modified: trunk/Source/WTF/wtf/ThreadingPthreads.cpp (161059 => 161060)
--- trunk/Source/WTF/wtf/ThreadingPthreads.cpp 2013-12-24 21:00:30 UTC (rev 161059)
+++ trunk/Source/WTF/wtf/ThreadingPthreads.cpp 2013-12-24 21:06:22 UTC (rev 161060)
@@ -303,6 +303,11 @@
threadMap().remove(threadID);
}
+void yield()
+{
+ sched_yield();
+}
+
ThreadIdentifier currentThread()
{
ThreadIdentifier id = ThreadIdentifierData::identifier();
Modified: trunk/Source/WTF/wtf/ThreadingWin.cpp (161059 => 161060)
--- trunk/Source/WTF/wtf/ThreadingWin.cpp 2013-12-24 21:00:30 UTC (rev 161059)
+++ trunk/Source/WTF/wtf/ThreadingWin.cpp 2013-12-24 21:06:22 UTC (rev 161060)
@@ -284,6 +284,11 @@
clearThreadHandleForIdentifier(threadID);
}
+void yield()
+{
+ ::Sleep(1);
+}
+
ThreadIdentifier currentThread()
{
return static_cast<ThreadIdentifier>(GetCurrentThreadId());
Modified: trunk/Source/WebCore/ChangeLog (161059 => 161060)
--- trunk/Source/WebCore/ChangeLog 2013-12-24 21:00:30 UTC (rev 161059)
+++ trunk/Source/WebCore/ChangeLog 2013-12-24 21:06:22 UTC (rev 161060)
@@ -1,3 +1,14 @@
+2013-12-24 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r160959.
+ http://trac.webkit.org/changeset/160959
+ https://bugs.webkit.org/show_bug.cgi?id=126222
+
+ Caused Windows build to fail (Requested by rfong on #webkit).
+
+ * platform/sql/SQLiteDatabase.cpp:
+ (WebCore::SQLiteDatabase::interrupt):
+
2013-12-24 Ryosuke Niwa <[email protected]>
Unreviewed, rolling out r161051.
Modified: trunk/Source/WebCore/platform/sql/SQLiteDatabase.cpp (161059 => 161060)
--- trunk/Source/WebCore/platform/sql/SQLiteDatabase.cpp 2013-12-24 21:00:30 UTC (rev 161059)
+++ trunk/Source/WebCore/platform/sql/SQLiteDatabase.cpp 2013-12-24 21:06:22 UTC (rev 161060)
@@ -32,7 +32,6 @@
#include "SQLiteFileSystem.h"
#include "SQLiteStatement.h"
#include <sqlite3.h>
-#include <thread>
#include <wtf/Threading.h>
#include <wtf/text/CString.h>
#include <wtf/text/WTFString.h>
@@ -141,7 +140,7 @@
if (!m_db)
return;
sqlite3_interrupt(m_db);
- std::this_thread::yield();
+ yield();
}
m_lockingMutex.unlock();