thread: use WaitForSingleObjectEx if available

Windows XP and up

Change-Id: Ie1a46a82722b8624437c8aba0aa4566a4b0b3f57
This commit is contained in:
James Zern 2015-11-23 20:40:26 -08:00
parent 63fadc9ffa
commit 0fd0e12bfe

View File

@ -58,6 +58,11 @@ struct WebPWorkerImpl {
#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 int pthread_create(pthread_t* const thread, const void* attr,
unsigned int (__stdcall *start)(void*), void* arg) {
(void)attr;