Title: [188327] trunk/Tools
Revision
188327
Author
[email protected]
Date
2015-08-11 22:49:09 -0700 (Tue, 11 Aug 2015)

Log Message

Fix test after build fix in r188286.
https://bugs.webkit.org/show_bug.cgi?id=147907

Patch by Alex Christensen <[email protected]> on 2015-08-11
Reviewed by Anders Carlsson.

* TestWebKitAPI/Tests/WTF/ParkingLot.cpp:
sleep_for can now be used, but we need to include <thread>

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (188326 => 188327)


--- trunk/Tools/ChangeLog	2015-08-12 05:45:49 UTC (rev 188326)
+++ trunk/Tools/ChangeLog	2015-08-12 05:49:09 UTC (rev 188327)
@@ -1,3 +1,13 @@
+2015-08-11  Alex Christensen  <[email protected]>
+
+        Fix test after build fix in r188286.
+        https://bugs.webkit.org/show_bug.cgi?id=147907
+
+        Reviewed by Anders Carlsson.
+
+        * TestWebKitAPI/Tests/WTF/ParkingLot.cpp:
+        sleep_for can now be used, but we need to include <thread>
+
 2015-08-11  Filip Pizlo  <[email protected]>
 
         Always use a byte-sized lock implementation

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/ParkingLot.cpp (188326 => 188327)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/ParkingLot.cpp	2015-08-12 05:45:49 UTC (rev 188326)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/ParkingLot.cpp	2015-08-12 05:49:09 UTC (rev 188327)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include <condition_variable>
 #include <mutex>
+#include <thread>
 #include <wtf/DataLog.h>
 #include <wtf/HashSet.h>
 #include <wtf/ListDump.h>
@@ -33,10 +34,6 @@
 #include <wtf/Threading.h>
 #include <wtf/ThreadingPrimitives.h>
 
-#if PLATFORM(WIN)
-#include <windows.h>
-#endif
-
 using namespace WTF;
 
 namespace TestWebKitAPI {
@@ -195,11 +192,7 @@
         tests[latchIndex].initialize(numThreads);
 
     for (unsigned unparkIndex = 0; unparkIndex < numSingleUnparks; ++unparkIndex) {
-#if PLATFORM(WIN)
-        Sleep(delay / 1000);
-#else
-        usleep(delay);
-#endif
+        std::this_thread::sleep_for(std::chrono::microseconds(delay));
         for (unsigned latchIndex = numLatches; latchIndex--;)
             tests[latchIndex].unparkOne(unparkIndex);
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to