Add a pthread_cleanup compatible function to release a pthread_rwlock.

This commit is contained in:
Mike Brady
2023-09-21 15:50:43 +01:00
parent 847ad7fb9c
commit 60cee967dc
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -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;
+1
View File
@@ -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);