From 7954e67bb85b6b13ab8ff4036fff29bfc3547901 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 1 Jul 2016 14:34:09 -0700 Subject: [PATCH] vpx_thread: use WaitForSingleObjectEx if available BUG=b/29583578 original webp change: commit 0fd0e12bfe83f16ce4f1c038b251ccbc13c62ac2 Author: James Zern 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 --- vpx_util/vpx_thread.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vpx_util/vpx_thread.h b/vpx_util/vpx_thread.h index cf55a75..30f47a1 100644 --- a/vpx_util/vpx_thread.h +++ b/vpx_util/vpx_thread.h @@ -52,6 +52,11 @@ typedef struct { #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) { -- 2.7.4