[vlc-devel] [PATCH 3/3] threads: remove vlc_rwlock_destroy()
remi at remlab.net
remi at remlab.net
Tue Jan 12 17:30:33 UTC 2021
From: RĂ©mi Denis-Courmont <remi at remlab.net>
---
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 0004ee0ef0..51217a66a1 100644
--- a/include/vlc_threads.h
+++ b/include/vlc_threads.h
@@ -555,17 +555,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 a1da0edae5..4dfde6dd0b 100644
--- a/src/misc/threads.c
+++ b/src/misc/threads.c
@@ -385,11 +385,6 @@ void vlc_rwlock_init (vlc_rwlock_t *lock)
vlc_mutex_init (&lock->mutex);
}
-void vlc_rwlock_destroy (vlc_rwlock_t *lock)
-{
- (void) lock;
-}
-
void vlc_rwlock_rdlock (vlc_rwlock_t *lock)
{
while (vlc_rwlock_tryrdlock(lock))
--
2.30.0
More information about the vlc-devel
mailing list