Port BinarySemaphoreWin.cpp to WinCE
authorparoga@webkit.org <paroga@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Apr 2012 01:53:54 +0000 (01:53 +0000)
committerparoga@webkit.org <paroga@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Apr 2012 01:53:54 +0000 (01:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=83502

Reviewed by Daniel Bates.

Replace WaitForSingleObjectEx with WaitForSingleObject since
the additonal parameter supported by the extended function
is not used anyway and the function does not exist on WinCE.

* wtf/CMakeLists.txt:
* wtf/PlatformWinCE.cmake:
* wtf/threads/win/BinarySemaphoreWin.cpp:
(WTF::BinarySemaphore::wait):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113657 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WTF/ChangeLog
Source/WTF/wtf/CMakeLists.txt
Source/WTF/wtf/PlatformWinCE.cmake
Source/WTF/wtf/threads/win/BinarySemaphoreWin.cpp

index b5b2a43..0a546a6 100644 (file)
@@ -1,5 +1,21 @@
 2012-04-09  Patrick Gansterer  <paroga@webkit.org>
 
+        Port BinarySemaphoreWin.cpp to WinCE
+        https://bugs.webkit.org/show_bug.cgi?id=83502
+
+        Reviewed by Daniel Bates.
+
+        Replace WaitForSingleObjectEx with WaitForSingleObject since
+        the additonal parameter supported by the extended function
+        is not used anyway and the function does not exist on WinCE.
+
+        * wtf/CMakeLists.txt:
+        * wtf/PlatformWinCE.cmake:
+        * wtf/threads/win/BinarySemaphoreWin.cpp:
+        (WTF::BinarySemaphore::wait):
+
+2012-04-09  Patrick Gansterer  <paroga@webkit.org>
+
         [CMake] Build fix for USE_SYSTEM_MALLOC after r113570.
 
         * wtf/CMakeLists.txt:
index 4411326..63245bf 100644 (file)
@@ -187,8 +187,9 @@ SET(WTF_SOURCES
 SET(WTF_INCLUDE_DIRECTORIES
     "${WTF_DIR}"
     "${WTF_DIR}/wtf"
-    "${WTF_DIR}/wtf/unicode"
     "${WTF_DIR}/wtf/dtoa"
+    "${WTF_DIR}/wtf/threads"
+    "${WTF_DIR}/wtf/unicode"
     "${THIRDPARTY_DIR}"
     "${CMAKE_BINARY_DIR}"
 )
index c34c5e5..d30282f 100644 (file)
@@ -11,6 +11,8 @@ LIST(APPEND WTF_SOURCES
     ThreadingWin.cpp
     ThreadSpecificWin.cpp
 
+    threads/win/BinarySemaphoreWin.cpp
+
     unicode/CollatorDefault.cpp
     unicode/wince/UnicodeWinCE.cpp
 
index adc9e9b..0dad1ac 100644 (file)
@@ -52,7 +52,7 @@ bool BinarySemaphore::wait(double absoluteTime)
         return false;
     }
 
-    DWORD result = ::WaitForSingleObjectEx(m_event, interval, FALSE);
+    DWORD result = ::WaitForSingleObject(m_event, interval);
     switch (result) {
     case WAIT_OBJECT_0:
         // The event was signaled.
@@ -63,10 +63,11 @@ bool BinarySemaphore::wait(double absoluteTime)
         return false;
 
     case WAIT_FAILED:
-        ASSERT_WITH_MESSAGE(false, "::WaitForSingleObjectEx failed with error %lu", ::GetLastError());
+        ASSERT_WITH_MESSAGE(false, "::WaitForSingleObject failed with error %lu", ::GetLastError());
         return false;
+
     default:
-        ASSERT_WITH_MESSAGE(false, "::WaitForSingleObjectEx returned unexpected result %lu", result);
+        ASSERT_WITH_MESSAGE(false, "::WaitForSingleObject returned unexpected result %lu", result);
         return false;
     }
 }