Title: [188286] trunk/Tools
- Revision
- 188286
- Author
- [email protected]
- Date
- 2015-08-11 13:38:17 -0700 (Tue, 11 Aug 2015)
Log Message
Another speculative build fix after r188280.
* TestWebKitAPI/Tests/WTF/ParkingLot.cpp:
std::this_thread is too modern c++ for VS2013 and supported GCC versions,
so let's go back to usleep and I made something close to usleep, but with much lower resolution.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (188285 => 188286)
--- trunk/Tools/ChangeLog 2015-08-11 20:36:06 UTC (rev 188285)
+++ trunk/Tools/ChangeLog 2015-08-11 20:38:17 UTC (rev 188286)
@@ -1,5 +1,13 @@
2015-08-11 Alex Christensen <[email protected]>
+ Another speculative build fix after r188280.
+
+ * TestWebKitAPI/Tests/WTF/ParkingLot.cpp:
+ std::this_thread is too modern c++ for VS2013 and supported GCC versions,
+ so let's go back to usleep and I made something close to usleep, but with much lower resolution.
+
+2015-08-11 Alex Christensen <[email protected]>
+
Unreviewed build fix after r188280.
* TestWebKitAPI/Tests/WTF/ParkingLot.cpp:
Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/ParkingLot.cpp (188285 => 188286)
--- trunk/Tools/TestWebKitAPI/Tests/WTF/ParkingLot.cpp 2015-08-11 20:36:06 UTC (rev 188285)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/ParkingLot.cpp 2015-08-11 20:38:17 UTC (rev 188286)
@@ -33,6 +33,10 @@
#include <wtf/Threading.h>
#include <wtf/ThreadingPrimitives.h>
+#if PLATFORM(WIN)
+#include <windows.h>
+#endif
+
using namespace WTF;
namespace TestWebKitAPI {
@@ -191,7 +195,11 @@
tests[latchIndex].initialize(numThreads);
for (unsigned unparkIndex = 0; unparkIndex < numSingleUnparks; ++unparkIndex) {
- std::this_thread::sleep_for(std::chrono::microseconds(delay));
+#if PLATFORM(WIN)
+ Sleep(delay / 1000);
+#else
+ usleep(delay);
+#endif
for (unsigned latchIndex = numLatches; latchIndex--;)
tests[latchIndex].unparkOne(unparkIndex);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes