]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Add a pthread_cleanup compatible function to release a pthread_rwlock.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Thu, 21 Sep 2023 14:50:43 +0000 (15:50 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Thu, 21 Sep 2023 14:50:43 +0000 (15:50 +0100)
common.c
common.h

index d16e3b1f118348c54dec0be3717cd41edf5ab36e..4dc75bc7f07df6eda1a209348cf4174b7ac81895 100644 (file)
--- a/common.c
+++ b/common.c
@@ -1725,6 +1725,8 @@ void mutex_cleanup(void *arg) {
 
 void mutex_unlock(void *arg) { pthread_mutex_unlock((pthread_mutex_t *)arg); }
 
+void rwlock_unlock(void *arg) { pthread_rwlock_unlock((pthread_rwlock_t *)arg); }
+
 void thread_cleanup(void *arg) {
   debug(3, "thread_cleanup called.");
   pthread_t *thread = (pthread_t *)arg;
index edd48fa8d8bda6f59844b59770f27213b69afd08..1b9e2f03dc75b73c2195c9b04a08cc8317856211 100644 (file)
--- a/common.h
+++ b/common.h
@@ -495,6 +495,7 @@ uint16_t bind_UDP_port(int ip_family, const char *self_ip_address, uint32_t scop
 
 void socket_cleanup(void *arg);
 void mutex_unlock(void *arg);
+void rwlock_unlock(void *arg);
 void mutex_cleanup(void *arg);
 void cv_cleanup(void *arg);
 void thread_cleanup(void *arg);