[vlc-commits] threads: remove vlc_rwlock_destroy()

Rémi Denis-Courmont git at videolan.org
Wed Jan 13 17:55:14 UTC 2021


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jan 10 14:03:00 2021 +0200| [6e6c2850a17867e3bf12a2fff8dfe3281335797a] | committer: Rémi Denis-Courmont

threads: remove vlc_rwlock_destroy()

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

 include/vlc_threads.h | 8 --------
 src/libvlccore.sym    | 1 -
 src/misc/messages.c   | 1 -
 src/misc/threads.c    | 5 -----
 4 files changed, 15 deletions(-)

diff --git a/include/vlc_threads.h b/include/vlc_threads.h
index 2054e632f0..0aac31afbf 100644
--- a/include/vlc_threads.h
+++ b/include/vlc_threads.h
@@ -544,17 +544,9 @@ typedef struct vlc_rwlock
 
 /**
  * Initializes a read/write lock.
- *
- * After use, a read/write lock must be deinitialized with
- * vlc_rwlock_destroy().
  */
 VLC_API void vlc_rwlock_init(vlc_rwlock_t *);
 
-/**
- * Destroys an initialized unused read/write lock.
- */
-VLC_API void vlc_rwlock_destroy(vlc_rwlock_t *);
-
 /**
  * Acquires a read/write lock for reading.
  *
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 2cfe0d376c..71267d5dfc 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -651,7 +651,6 @@ vlc_lrand48
 vlc_mrand48
 vlc_qsort
 vlc_restorecancel
-vlc_rwlock_destroy
 vlc_rwlock_init
 vlc_rwlock_rdlock
 vlc_rwlock_unlock
diff --git a/src/misc/messages.c b/src/misc/messages.c
index 898e4be56f..7fe374947b 100644
--- a/src/misc/messages.c
+++ b/src/misc/messages.c
@@ -332,7 +332,6 @@ static void vlc_LogSwitchClose(void *d)
     logswitch->backend = &discard_log;
     backend->ops->destroy(backend);
 
-    vlc_rwlock_destroy(&logswitch->lock);
     free(logswitch);
 }
 
diff --git a/src/misc/threads.c b/src/misc/threads.c
index 460fabc3c8..dcb604c0aa 100644
--- a/src/misc/threads.c
+++ b/src/misc/threads.c
@@ -391,11 +391,6 @@ void vlc_rwlock_init (vlc_rwlock_t *lock)
     lock->state = 0;
 }
 
-void vlc_rwlock_destroy (vlc_rwlock_t *lock)
-{
-    (void) lock;
-}
-
 void vlc_rwlock_rdlock (vlc_rwlock_t *lock)
 {
     vlc_mutex_lock (&lock->mutex);



More information about the vlc-commits mailing list