shithub: libvpx

Download patch

ref: 7954e67bb85b6b13ab8ff4036fff29bfc3547901
parent: a48d42a804a267b57b7c9a6390450731caedeea2
author: James Zern <jzern@google.com>
date: Fri Jul 1 10:34:09 EDT 2016

vpx_thread: use WaitForSingleObjectEx if available

BUG=b/29583578

original webp change:

commit 0fd0e12bfe83f16ce4f1c038b251ccbc13c62ac2
Author: James Zern <jzern@google.com>
Date:   Mon Nov 23 20:40:26 2015 -0800

    thread: use WaitForSingleObjectEx if available

    Windows XP and up

    Change-Id: Ie1a46a82722b8624437c8aba0aa4566a4b0b3f57

100644 blob d58f74e5523dbc985fc531cf5f0833f1e9157cf0 src/utils/thread.c
100644 blob 840831185502d42a3246e4b7ff870121c8064791 src/utils/thread.h

Change-Id: If165c38b378c6e0c55e17a1b071efd3ec3e7dcdd

--- a/vpx_util/vpx_thread.h
+++ b/vpx_util/vpx_thread.h
@@ -52,6 +52,11 @@
 #define THREADFN unsigned int __stdcall
 #define THREAD_RETURN(val) (unsigned int)((DWORD_PTR)val)
 
+#if _WIN32_WINNT >= 0x0501  // Windows XP or greater
+#define WaitForSingleObject(obj, timeout) \
+  WaitForSingleObjectEx(obj, timeout, FALSE /*bAlertable*/)
+#endif
+
 static INLINE int pthread_create(pthread_t* const thread, const void* attr,
                                  unsigned int (__stdcall *start)(void*),
                                  void* arg) {