[vlc-devel] commit: WinCE: missing threading functions (Geoffroy Couprie )

git version control git at videolan.org
Wed Oct 1 15:28:48 CEST 2008


vlc | branch: master | Geoffroy Couprie <geo.couprie at gmail.com> | Wed Oct  1 15:28:04 2008 +0200| [559e14738d43e0923459313dd9a89cc875be8db7] | committer: Geoffroy Couprie 

WinCE: missing threading functions

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=559e14738d43e0923459313dd9a89cc875be8db7
---

 include/vlc_threads.h |    5 +++++
 src/misc/threads.c    |    2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/vlc_threads.h b/include/vlc_threads.h
index 4050150..00e5b18 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 b2f52a3..72022d5 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




More information about the vlc-devel mailing list