[vlc-devel] [[PATCH v3] 5/6] threads: use a common dummy vlc_control_cancel when LIBVLC_USE_PTHREAD_CLEANUP

Steve Lhomme robux4 at ycbcr.xyz
Mon Feb 10 14:39:14 CET 2020


---
 src/android/thread.c | 6 ------
 src/darwin/thread.c  | 6 ------
 src/missing.c        | 9 +++++++++
 src/posix/thread.c   | 6 ------
 4 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/src/android/thread.c b/src/android/thread.c
index 26723d56726..950a814199e 100644
--- a/src/android/thread.c
+++ b/src/android/thread.c
@@ -329,12 +329,6 @@ void vlc_testcancel (void)
     pthread_exit(NULL);
 }
 
-noreturn void vlc_control_cancel (int cmd, ...)
-{
-    (void) cmd;
-    vlc_assert_unreachable ();
-}
-
 void vlc_cancel_addr_set(atomic_uint *addr)
 {
     vlc_thread_t th = vlc_thread_self();
diff --git a/src/darwin/thread.c b/src/darwin/thread.c
index d8cd73d0ccf..1eca7755d2f 100644
--- a/src/darwin/thread.c
+++ b/src/darwin/thread.c
@@ -531,12 +531,6 @@ void vlc_testcancel (void)
     pthread_testcancel ();
 }
 
-void vlc_control_cancel (int cmd, ...)
-{
-    (void) cmd;
-    vlc_assert_unreachable ();
-}
-
 vlc_tick_t vlc_tick_now (void)
 {
     vlc_clock_setup();
diff --git a/src/missing.c b/src/missing.c
index edfd458cd16..dcab1b1d6b7 100644
--- a/src/missing.c
+++ b/src/missing.c
@@ -294,3 +294,12 @@ noreturn update_release_t *update_GetRelease(update_t *u)
     vlc_assert_unreachable();
 }
 #endif /* !UPDATE_CHECK */
+
+#include <vlc_threads.h>
+#if defined(LIBVLC_USE_PTHREAD_CLEANUP)
+noreturn void vlc_control_cancel (int cmd, ...)
+{
+    (void) cmd;
+    vlc_assert_unreachable ();
+}
+#endif
diff --git a/src/posix/thread.c b/src/posix/thread.c
index 9c3206443bf..dfe0ea7c9da 100644
--- a/src/posix/thread.c
+++ b/src/posix/thread.c
@@ -554,12 +554,6 @@ void vlc_testcancel (void)
     pthread_testcancel ();
 }
 
-noreturn void vlc_control_cancel (int cmd, ...)
-{
-    (void) cmd;
-    vlc_assert_unreachable ();
-}
-
 vlc_tick_t vlc_tick_now (void)
 {
     struct timespec ts;
-- 
2.17.1



More information about the vlc-devel mailing list