[vlc-commits] threads: use a common dummy vlc_control_cancel when LIBVLC_USE_PTHREAD_CLEANUP

Steve Lhomme git at videolan.org
Mon Feb 10 14:54:12 CET 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Feb 10 13:51:45 2020 +0100| [7ca3c3640b503af5f2315c5421f395bea89a3090] | committer: Steve Lhomme

threads: use a common dummy vlc_control_cancel when LIBVLC_USE_PTHREAD_CLEANUP

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

 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 26723d5672..950a814199 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 d8cd73d0cc..1eca7755d2 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 edfd458cd1..dcab1b1d6b 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 9c3206443b..dfe0ea7c9d 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;



More information about the vlc-commits mailing list