vpx_thread: use InitializeCriticalSectionEx if available
BUG=b/29583578 original webp change: commit 63fadc9ffacc77d4617526a50c696d21d558a70b Author: James Zern <jzern@google.com> Date: Mon Nov 23 20:38:46 2015 -0800 thread: use InitializeCriticalSectionEx if available Windows Vista / Server 2008 and up Change-Id: I32c5b4e5384d614c5a821ef511293ff014c67966 100644 blob f84207d89b3a6bb98bfe8f3fa55cad72dfd061ff src/utils/thread.c 100644 blob 840831185502d42a3246e4b7ff870121c8064791 src/utils/thread.h Change-Id: I9ce49b3a86857267e504cd8ceab503b7b441d614
This commit is contained in:
parent
8cc525e82b
commit
a48d42a804
@ -77,7 +77,11 @@ static INLINE int pthread_join(pthread_t thread, void** value_ptr) {
|
||||
static INLINE int pthread_mutex_init(pthread_mutex_t *const mutex,
|
||||
void* mutexattr) {
|
||||
(void)mutexattr;
|
||||
#if _WIN32_WINNT >= 0x0600 // Windows Vista / Server 2008 or greater
|
||||
InitializeCriticalSectionEx(mutex, 0 /*dwSpinCount*/, 0 /*Flags*/);
|
||||
#else
|
||||
InitializeCriticalSection(mutex);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user