aom_thread: fix windows pthread compatibility layer Add pthread_attr_t, pthread_attr_init and pthread_attr_destroy. Needed after: fa352664dd aom_thread: increase stack size w/Debug+ASan Bug: aomedia:3379 Change-Id: I6fc6e590c6949bb25caadc7f6e71759cc2b09595
diff --git a/aom_util/aom_thread.h b/aom_util/aom_thread.h index 2df190f..ec2ea43 100644 --- a/aom_util/aom_thread.h +++ b/aom_util/aom_thread.h
@@ -37,6 +37,7 @@ #include <process.h> // NOLINT #include <windows.h> // NOLINT typedef HANDLE pthread_t; +typedef int pthread_attr_t; typedef CRITICAL_SECTION pthread_mutex_t; #if _WIN32_WINNT < 0x0600 @@ -60,7 +61,18 @@ #define THREADFN unsigned int __stdcall #define THREAD_RETURN(val) (unsigned int)((DWORD_PTR)val) -static INLINE int pthread_create(pthread_t *const thread, const void *attr, +static INLINE int pthread_attr_init(pthread_attr_t *attr) { + (void)attr; + return 0; +} + +static INLINE int pthread_attr_destroy(pthread_attr_t *attr) { + (void)attr; + return 0; +} + +static INLINE int pthread_create(pthread_t *const thread, + const pthread_attr_t *attr, unsigned int(__stdcall *start)(void *), void *arg) { (void)attr;