#include <windows.h>
#include <process.h>
+#if _WIN32_WINNT < 0x0600 && defined(__MINGW32__)
+#undef MemoryBarrier
+#define MemoryBarrier __sync_synchronize
+#endif
+
#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
{
thread->func = start_routine;
thread->arg = arg;
+#if HAVE_WINRT
+ thread->handle = (void*)CreateThread(NULL, 0, win32thread_worker, thread,
+ 0, NULL);
+#else
thread->handle = (void*)_beginthreadex(NULL, 0, win32thread_worker, thread,
0, NULL);
+#endif
return !thread->handle;
}