Commit 0211cd89 authored by John Koleszar's avatar John Koleszar

rtcd/win32: prefer win32 primatives to pthreads

Fixes some build issues for people building for win32 who have a
pthreads emulation layer installed.

Change-Id: I0e0003fa01f65020f6ced35d961dcb1130db37a8
parent b501251e
......@@ -11,16 +11,7 @@
#define RTCD_C
#include "vpx_rtcd.h"
#if CONFIG_MULTITHREAD && HAVE_PTHREAD_H
#include <pthread.h>
static void once(void (*func)(void))
{
static pthread_once_t lock = PTHREAD_ONCE_INIT;
pthread_once(&lock, func);
}
#elif CONFIG_MULTITHREAD && defined(_WIN32)
#if CONFIG_MULTITHREAD && defined(_WIN32)
#include <windows.h>
static void once(void (*func)(void))
{
......@@ -44,6 +35,15 @@ static void once(void (*func)(void))
}
#elif CONFIG_MULTITHREAD && HAVE_PTHREAD_H
#include <pthread.h>
static void once(void (*func)(void))
{
static pthread_once_t lock = PTHREAD_ONCE_INIT;
pthread_once(&lock, func);
}
#else
/* No-op version that performs no synchronization. vpx_rtcd() is idempotent,
* so as long as your platform provides atomic loads/stores of pointers
......
Markdown is supported
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