<html><head></head><body>Okay except for removing vlc_thread_id() in OS/2 code.<br><br><div class="gmail_quote">Le 2 mars 2020 15:23:00 GMT+02:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail"><hr> include/vlc_threads.h | 35 -----------------------------------<br> src/android/thread.c  |  5 -----<br> src/darwin/thread.c   |  5 -----<br> src/libvlccore.sym    |  1 -<br> src/os2/thread.c      | 10 ----------<br> src/posix/thread.c    |  5 -----<br> src/win32/thread.c    |  5 -----<br> 7 files changed, 66 deletions(-)<br><br>diff --git a/include/vlc_threads.h b/include/vlc_threads.h<br>index cc99db97668..131e3196226 100644<br>--- a/include/vlc_threads.h<br>+++ b/include/vlc_threads.h<br>@@ -59,9 +59,6 @@ VLC_API void vlc_testcancel(void);<br> typedef struct vlc_thread *vlc_thread_t;<br> # define VLC_THREAD_CANCELED NULL<br> <br>-typedef unsigned long vlc_osthread_t;<br>-#define vlc_thread_equal(a,b) ((a) == (b))<br>-<br> # define LIBVLC_NEED_SLEEP<br> #define LIBVLC_NEED_RWLOCK<br> typedef INIT_ONCE vlc_once_t;<br>@@ -94,9 +91,6 @@ static inline int vlc_poll(struct pollfd *fds, unsigned nfds, int timeout)<br> typedef struct vlc_thread *vlc_thread_t;<br> #define VLC_THREAD_CANCELED NULL<br> <br>-typedef unsigned long vlc_osthread_t;<br>-#define vlc_thread_equal(a,b) ((a) == (b))<br>-<br> #define LIBVLC_NEED_RWLOCK<br> typedef struct<br> {<br>@@ -148,8 +142,6 @@ static inline int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)<br> <br> typedef struct vlc_thread *vlc_thread_t;<br> #define VLC_THREAD_CANCELED NULL<br>-typedef pthread_t vlc_osthread_t;<br>-#define vlc_thread_equal(a,b) pthread_equal(a,b)<br> typedef pthread_once_t  vlc_once_t;<br> #define VLC_STATIC_ONCE   PTHREAD_ONCE_INIT<br> typedef pthread_key_t   vlc_threadvar_t;<br>@@ -193,8 +185,6 @@ static inline int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)<br> <br> typedef pthread_t       vlc_thread_t;<br> #define VLC_THREAD_CANCELED PTHREAD_CANCELED<br>-typedef pthread_t       vlc_osthread_t;<br>-#define vlc_thread_equal(a,b) pthread_equal(a,b)<br> typedef pthread_rwlock_t vlc_rwlock_t;<br> #define VLC_STATIC_RWLOCK PTHREAD_RWLOCK_INITIALIZER<br> typedef pthread_once_t  vlc_once_t;<br>@@ -236,9 +226,6 @@ typedef struct<br>  */<br> #define VLC_THREAD_CANCELED PTHREAD_CANCELED<br> <br>-typedef pthread_t vlc_osthread_t;<br>-#define vlc_thread_equal(a,b) pthread_equal(a,b)<br>-<br> /**<br>  * Read/write lock.<br>  *<br>@@ -842,26 +829,6 @@ typedef struct vlc_cleanup_t vlc_cleanup_t;<br>  */<br> VLC_API void vlc_control_cancel(vlc_cleanup_t *);<br> <br>-/**<br>- * Thread handle.<br>- *<br>- * This function returns the thread handle of the calling thread.<br>- * This works even if the thread was <b>not</b> created with vlc_clone().<br>- * As a consequence, depending on the platform, this might or might not be the<br>- * same as the @ref vlc_thread_t thread handle returned by vlc_clone().<br>- *<br>- * Also depending on the platform, this might be an integer type, a pointer<br>- * type, or a compound type of any (reasonable) size. To compare two thread<br>- * handles, use the vlc_thread_equal() macro, not a hand-coded comparison.<br>- * Comparing the calling thread for equality with another thread is in fact<br>- * pretty much the only purpose of this function.<br>- *<br>- * \note If you need an integer identifier, use vlc_thread_id() instead.<br>- *<br>- * \return the OS run-time thread handle<br>- */<br>-VLC_API vlc_osthread_t vlc_thread_self(void) VLC_USED;<br>-<br> /**<br>  * Thread identifier.<br>  *<br>@@ -874,8 +841,6 @@ VLC_API vlc_osthread_t vlc_thread_self(void) VLC_USED;<br>  * There are no particular semantics to the thread ID with LibVLC.<br>  * It is provided mainly for tracing and debugging.<br>  *<br>- * See also vlc_thread_self().<br>- *<br>  * \warning This function is not currently implemented on all supported<br>  * platforms. Where not implemented, it returns (unsigned long)-1.<br>  *<br>diff --git a/src/android/thread.c b/src/android/thread.c<br>index 69ec70c25db..f831f5b5c11 100644<br>--- a/src/android/thread.c<br>+++ b/src/android/thread.c<br>@@ -92,11 +92,6 @@ struct vlc_thread<br> <br> static thread_local struct vlc_thread *thread = NULL;<br> <br>-pthread_t vlc_thread_self(void)<br>-{<br>-    return pthread_self();<br>-}<br>-<br> void vlc_threads_setup (libvlc_int_t *p_libvlc)<br> {<br>     (void)p_libvlc;<br>diff --git a/src/darwin/thread.c b/src/darwin/thread.c<br>index 7e7de3d815e..13ccbeed2de 100644<br>--- a/src/darwin/thread.c<br>+++ b/src/darwin/thread.c<br>@@ -238,11 +238,6 @@ int vlc_clone_detach (vlc_thread_t *th, void *(*entry) (void *), void *data,<br>     return vlc_clone_attr (th, &attr, entry, data, priority);<br> }<br> <br>-vlc_thread_t vlc_thread_self (void)<br>-{<br>-    return pthread_self ();<br>-}<br>-<br> unsigned long vlc_thread_id (void)<br> {<br>     return -1;<br>diff --git a/src/libvlccore.sym b/src/libvlccore.sym<br>index 0f60077bb2b..caf42878421 100644<br>--- a/src/libvlccore.sym<br>+++ b/src/libvlccore.sym<br>@@ -644,7 +644,6 @@ vlc_sd_GetNames<br> vlc_sd_probe_Add<br> vlc_sdp_Start<br> vlc_testcancel<br>-vlc_thread_self<br> vlc_thread_id<br> vlc_threadvar_create<br> vlc_threadvar_delete<br>diff --git a/src/os2/thread.c b/src/os2/thread.c<br>index b732e9fb6e1..536e4128e64 100644<br>--- a/src/os2/thread.c<br>+++ b/src/os2/thread.c<br>@@ -406,16 +406,6 @@ int vlc_set_priority (vlc_thread_t th, int priority)<br>     return VLC_SUCCESS;<br> }<br> <br>-unsigned long vlc_thread_self(void)<br>-{<br>-    return vlc_thread_id();<br>-}<br>-<br>-unsigned long vlc_thread_id (void)<br>-{<br>-    return _gettid();<br>-}<br>-<br> /*** Thread cancellation ***/<br> <br> /* APC procedure for thread cancellation */<br>diff --git a/src/posix/thread.c b/src/posix/thread.c<br>index 32d48b5cc26..27a4a49a98e 100644<br>--- a/src/posix/thread.c<br>+++ b/src/posix/thread.c<br>@@ -316,11 +316,6 @@ int vlc_clone_detach (vlc_thread_t *th, void *(*entry) (void *), void *data,<br>     return vlc_clone_attr (th, &attr, entry, data, priority);<br> }<br> <br>-pthread_t vlc_thread_self(void)<br>-{<br>-    return pthread_self();<br>-}<br>-<br> VLC_WEAK unsigned long vlc_thread_id(void)<br> {<br>      return -1;<br>diff --git a/src/win32/thread.c b/src/win32/thread.c<br>index 3292936321a..18fa754ea89 100644<br>--- a/src/win32/thread.c<br>+++ b/src/win32/thread.c<br>@@ -451,11 +451,6 @@ int vlc_clone_detach (vlc_thread_t *p_handle, void *(*entry) (void *),<br>     return vlc_clone_attr (p_handle, true, entry, data, priority);<br> }<br> <br>-unsigned long vlc_thread_self(void)<br>-{<br>-    return GetCurrentThreadId();<br>-}<br>-<br> unsigned long vlc_thread_id (void)<br> {<br>     return GetCurrentThreadId ();</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>