[vlc-commits] vlc_threads: remove unused vlc_thread_self / vlc_thread_equal / vlc_osthread_t
Steve Lhomme
git at videolan.org
Mon Mar 2 15:49:27 CET 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Mar 2 14:22:54 2020 +0100| [fb89621ad57738d2efa65245b5126215dfe19e5c] | committer: Steve Lhomme
vlc_threads: remove unused vlc_thread_self / vlc_thread_equal / vlc_osthread_t
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fb89621ad57738d2efa65245b5126215dfe19e5c
---
include/vlc_threads.h | 35 -----------------------------------
src/android/thread.c | 5 -----
src/darwin/thread.c | 5 -----
src/libvlccore.sym | 1 -
src/os2/thread.c | 5 -----
src/posix/thread.c | 5 -----
src/win32/thread.c | 5 -----
7 files changed, 61 deletions(-)
diff --git a/include/vlc_threads.h b/include/vlc_threads.h
index cc99db9766..131e319622 100644
--- a/include/vlc_threads.h
+++ b/include/vlc_threads.h
@@ -59,9 +59,6 @@ VLC_API void vlc_testcancel(void);
typedef struct vlc_thread *vlc_thread_t;
# define VLC_THREAD_CANCELED NULL
-typedef unsigned long vlc_osthread_t;
-#define vlc_thread_equal(a,b) ((a) == (b))
-
# define LIBVLC_NEED_SLEEP
#define LIBVLC_NEED_RWLOCK
typedef INIT_ONCE vlc_once_t;
@@ -94,9 +91,6 @@ static inline int vlc_poll(struct pollfd *fds, unsigned nfds, int timeout)
typedef struct vlc_thread *vlc_thread_t;
#define VLC_THREAD_CANCELED NULL
-typedef unsigned long vlc_osthread_t;
-#define vlc_thread_equal(a,b) ((a) == (b))
-
#define LIBVLC_NEED_RWLOCK
typedef struct
{
@@ -148,8 +142,6 @@ static inline int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
typedef struct vlc_thread *vlc_thread_t;
#define VLC_THREAD_CANCELED NULL
-typedef pthread_t vlc_osthread_t;
-#define vlc_thread_equal(a,b) pthread_equal(a,b)
typedef pthread_once_t vlc_once_t;
#define VLC_STATIC_ONCE PTHREAD_ONCE_INIT
typedef pthread_key_t vlc_threadvar_t;
@@ -193,8 +185,6 @@ static inline int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
typedef pthread_t vlc_thread_t;
#define VLC_THREAD_CANCELED PTHREAD_CANCELED
-typedef pthread_t vlc_osthread_t;
-#define vlc_thread_equal(a,b) pthread_equal(a,b)
typedef pthread_rwlock_t vlc_rwlock_t;
#define VLC_STATIC_RWLOCK PTHREAD_RWLOCK_INITIALIZER
typedef pthread_once_t vlc_once_t;
@@ -236,9 +226,6 @@ typedef struct
*/
#define VLC_THREAD_CANCELED PTHREAD_CANCELED
-typedef pthread_t vlc_osthread_t;
-#define vlc_thread_equal(a,b) pthread_equal(a,b)
-
/**
* Read/write lock.
*
@@ -842,26 +829,6 @@ typedef struct vlc_cleanup_t vlc_cleanup_t;
*/
VLC_API void vlc_control_cancel(vlc_cleanup_t *);
-/**
- * Thread handle.
- *
- * This function returns the thread handle of the calling thread.
- * This works even if the thread was <b>not</b> created with vlc_clone().
- * As a consequence, depending on the platform, this might or might not be the
- * same as the @ref vlc_thread_t thread handle returned by vlc_clone().
- *
- * Also depending on the platform, this might be an integer type, a pointer
- * type, or a compound type of any (reasonable) size. To compare two thread
- * handles, use the vlc_thread_equal() macro, not a hand-coded comparison.
- * Comparing the calling thread for equality with another thread is in fact
- * pretty much the only purpose of this function.
- *
- * \note If you need an integer identifier, use vlc_thread_id() instead.
- *
- * \return the OS run-time thread handle
- */
-VLC_API vlc_osthread_t vlc_thread_self(void) VLC_USED;
-
/**
* Thread identifier.
*
@@ -874,8 +841,6 @@ VLC_API vlc_osthread_t vlc_thread_self(void) VLC_USED;
* There are no particular semantics to the thread ID with LibVLC.
* It is provided mainly for tracing and debugging.
*
- * See also vlc_thread_self().
- *
* \warning This function is not currently implemented on all supported
* platforms. Where not implemented, it returns (unsigned long)-1.
*
diff --git a/src/android/thread.c b/src/android/thread.c
index 69ec70c25d..f831f5b5c1 100644
--- a/src/android/thread.c
+++ b/src/android/thread.c
@@ -92,11 +92,6 @@ struct vlc_thread
static thread_local struct vlc_thread *thread = NULL;
-pthread_t vlc_thread_self(void)
-{
- return pthread_self();
-}
-
void vlc_threads_setup (libvlc_int_t *p_libvlc)
{
(void)p_libvlc;
diff --git a/src/darwin/thread.c b/src/darwin/thread.c
index 7e7de3d815..13ccbeed2d 100644
--- a/src/darwin/thread.c
+++ b/src/darwin/thread.c
@@ -238,11 +238,6 @@ int vlc_clone_detach (vlc_thread_t *th, void *(*entry) (void *), void *data,
return vlc_clone_attr (th, &attr, entry, data, priority);
}
-vlc_thread_t vlc_thread_self (void)
-{
- return pthread_self ();
-}
-
unsigned long vlc_thread_id (void)
{
return -1;
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 0f60077bb2..caf4287842 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -644,7 +644,6 @@ vlc_sd_GetNames
vlc_sd_probe_Add
vlc_sdp_Start
vlc_testcancel
-vlc_thread_self
vlc_thread_id
vlc_threadvar_create
vlc_threadvar_delete
diff --git a/src/os2/thread.c b/src/os2/thread.c
index b732e9fb6e..531bdd101b 100644
--- a/src/os2/thread.c
+++ b/src/os2/thread.c
@@ -406,11 +406,6 @@ int vlc_set_priority (vlc_thread_t th, int priority)
return VLC_SUCCESS;
}
-unsigned long vlc_thread_self(void)
-{
- return vlc_thread_id();
-}
-
unsigned long vlc_thread_id (void)
{
return _gettid();
diff --git a/src/posix/thread.c b/src/posix/thread.c
index 32d48b5cc2..27a4a49a98 100644
--- a/src/posix/thread.c
+++ b/src/posix/thread.c
@@ -316,11 +316,6 @@ int vlc_clone_detach (vlc_thread_t *th, void *(*entry) (void *), void *data,
return vlc_clone_attr (th, &attr, entry, data, priority);
}
-pthread_t vlc_thread_self(void)
-{
- return pthread_self();
-}
-
VLC_WEAK unsigned long vlc_thread_id(void)
{
return -1;
diff --git a/src/win32/thread.c b/src/win32/thread.c
index 3292936321..18fa754ea8 100644
--- a/src/win32/thread.c
+++ b/src/win32/thread.c
@@ -451,11 +451,6 @@ int vlc_clone_detach (vlc_thread_t *p_handle, void *(*entry) (void *),
return vlc_clone_attr (p_handle, true, entry, data, priority);
}
-unsigned long vlc_thread_self(void)
-{
- return GetCurrentThreadId();
-}
-
unsigned long vlc_thread_id (void)
{
return GetCurrentThreadId ();
More information about the vlc-commits
mailing list