Commit 31a31272 authored by James Zern's avatar James Zern Committed by Gerrit Code Review
Browse files

Merge "vp8: fix build with mingw+pthreads"

parents 0091fef7 ba7ebbb3
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#ifndef VP8_COMMON_THREADING_H_ #ifndef VP8_COMMON_THREADING_H_
#define VP8_COMMON_THREADING_H_ #define VP8_COMMON_THREADING_H_
#include "./vpx_config.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -20,7 +21,7 @@ extern "C" { ...@@ -20,7 +21,7 @@ extern "C" {
#if CONFIG_OS_SUPPORT && CONFIG_MULTITHREAD #if CONFIG_OS_SUPPORT && CONFIG_MULTITHREAD
/* Thread management macros */ /* Thread management macros */
#ifdef _WIN32 #if defined(_WIN32) && !HAVE_PTHREAD_H
/* Win32 */ /* Win32 */
#include <process.h> #include <process.h>
#include <windows.h> #include <windows.h>
...@@ -77,8 +78,8 @@ extern "C" { ...@@ -77,8 +78,8 @@ extern "C" {
#define ts_key_create(ts_key, destructor) pthread_key_create (&(ts_key), destructor); #define ts_key_create(ts_key, destructor) pthread_key_create (&(ts_key), destructor);
#endif #endif
/* Syncrhronization macros: Win32 and Pthreads */ /* Synchronization macros: Win32 and Pthreads */
#ifdef _WIN32 #if defined(_WIN32) && !HAVE_PTHREAD_H
#define sem_t HANDLE #define sem_t HANDLE
#define pause(voidpara) __asm PAUSE #define pause(voidpara) __asm PAUSE
#define sem_init(sem, sem_attr1, sem_init_value) (int)((*sem = CreateSemaphore(NULL,0,32768,NULL))==NULL) #define sem_init(sem, sem_attr1, sem_init_value) (int)((*sem = CreateSemaphore(NULL,0,32768,NULL))==NULL)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment