From 559e14738d43e0923459313dd9a89cc875be8db7 Mon Sep 17 00:00:00 2001 From: Geoffroy Couprie Date: Wed, 1 Oct 2008 15:28:04 +0200 Subject: [PATCH] WinCE: missing threading functions --- include/vlc_threads.h | 5 +++++ src/misc/threads.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/include/vlc_threads.h b/include/vlc_threads.h index 4050150378..00e5b18e5d 100644 --- a/include/vlc_threads.h +++ b/include/vlc_threads.h @@ -356,7 +356,12 @@ typedef CRITICAL_SECTION vlc_spinlock_t; */ static inline int vlc_spin_init (vlc_spinlock_t *spin) { +#ifdef UNDER_CE + InitializeCriticalSection(spin); + return 0; +#else return !InitializeCriticalSectionAndSpinCount(spin, 4000); +#endif } /** diff --git a/src/misc/threads.c b/src/misc/threads.c index b2f52a343b..72022d5d67 100644 --- a/src/misc/threads.c +++ b/src/misc/threads.c @@ -1061,6 +1061,8 @@ void vlc_control_cancel (int cmd, ...) #endif #if defined (LIBVLC_USE_PTHREAD) pthread_exit (PTHREAD_CANCELLED); +#elif defined (UNDER_CE) + ExitThread(0); #elif defined (WIN32) _endthread (); #else -- 2.39.2