diff options
author | wang-bin <wbsecg1@gmail.com> | 2015-09-29 13:11:03 +0300 |
---|---|---|
committer | Matt Oliver <protogonoi@gmail.com> | 2015-10-15 16:54:57 +0300 |
commit | 0861862b897ade9e62064f532f3b0a957ee7a0d8 (patch) | |
tree | 31a4529e5bc9ecfa7e668a0cb05249c04a72dd32 /compat/w32pthreads.h | |
parent | 909907948846dedf57a730a4d115d04d1117f9e5 (diff) |
winrt: multithreading support
_beginthreadex is for desktop only. CreateThread is available for windows store apps on windows (and phone) 8.1 and later. http://msdn.microsoft.com/en-us/library/ms682453%28VS.85%29.aspx
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
Diffstat (limited to 'compat/w32pthreads.h')
-rw-r--r-- | compat/w32pthreads.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h index 2aff72ae99..c25a191f21 100644 --- a/compat/w32pthreads.h +++ b/compat/w32pthreads.h @@ -82,8 +82,13 @@ static av_unused int pthread_create(pthread_t *thread, const void *unused_attr, { 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; } |