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

Rémi Denis-Courmont remi at remlab.net
Mon Feb 10 14:46:26 CET 2020


IIRC it's okay to have noreturn on the definition but not the declarations. So then OK.

Le 10 février 2020 15:39:14 GMT+02:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>---
> 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
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200210/c784f854/attachment.html>


More information about the vlc-devel mailing list