From: Kurt Zeilenga Date: Fri, 29 Jan 1999 06:05:18 +0000 (+0000) Subject: Add (back in) destroy functions... X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~679 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=26d29bb2f4df5f12a8a68ceb915647b7656445ac;p=openldap Add (back in) destroy functions... --- diff --git a/libraries/libldap_r/rdwr.c b/libraries/libldap_r/rdwr.c index 1d43efc075..56de51cf94 100644 --- a/libraries/libldap_r/rdwr.c +++ b/libraries/libldap_r/rdwr.c @@ -34,6 +34,14 @@ ldap_pvt_thread_rdwr_init(ldap_pvt_thread_rdwr_t *rdwrp ) return 0; } +int +ldap_pvt_thread_rdwr_destroy(ldap_pvt_thread_rdwr_t *rdwrp ) +{ + ldap_pvt_thread_mutex_destroy(&(rdwrp->lt_mutex) ); + ldap_pvt_thread_cond_destroy(&(rdwrp->lt_lock_free) ); + return 0; +} + int ldap_pvt_thread_rdwr_rlock(ldap_pvt_thread_rdwr_t *rdwrp){ ldap_pvt_thread_mutex_lock(&(rdwrp->lt_mutex)); while(rdwrp->lt_writer_writing) { diff --git a/libraries/libldap_r/thr_cthreads.c b/libraries/libldap_r/thr_cthreads.c index d69f029bfb..6eddb69317 100644 --- a/libraries/libldap_r/thr_cthreads.c +++ b/libraries/libldap_r/thr_cthreads.c @@ -75,6 +75,13 @@ ldap_pvt_thread_cond_init( ldap_pvt_thread_cond_t *cond ) return( 0 ); } +int +ldap_pvt_thread_cond_destroy( ldap_pvt_thread_cond_t *cond ) +{ + condition_clear( cond ); + return( 0 ); +} + int ldap_pvt_thread_cond_signal( ldap_pvt_thread_cond_t *cond ) { @@ -83,9 +90,9 @@ ldap_pvt_thread_cond_signal( ldap_pvt_thread_cond_t *cond ) } int -ldap_pvt_thread_cond_broadcast( ldap_pvt_thread_cond_t *cv ) +ldap_pvt_thread_cond_broadcast( ldap_pvt_thread_cond_t *cond ) { - condition_broadcast( cv ); + condition_broadcast( cond ); return( 0 ); } diff --git a/libraries/libldap_r/thr_posix.c b/libraries/libldap_r/thr_posix.c index 1ebb1b37d4..09f283d829 100644 --- a/libraries/libldap_r/thr_posix.c +++ b/libraries/libldap_r/thr_posix.c @@ -120,6 +120,12 @@ ldap_pvt_thread_cond_init( ldap_pvt_thread_cond_t *cond ) { return pthread_cond_init( cond, NULL ); } + +int +ldap_pvt_thread_cond_destroy( ldap_pvt_thread_cond_t *cond ) +{ + return pthread_cond_destroy( cond ); +} int ldap_pvt_thread_cond_signal( ldap_pvt_thread_cond_t *cond ) diff --git a/libraries/libldap_r/thr_stub.c b/libraries/libldap_r/thr_stub.c index ef47b81b3b..0b8f661d5b 100644 --- a/libraries/libldap_r/thr_stub.c +++ b/libraries/libldap_r/thr_stub.c @@ -75,6 +75,12 @@ ldap_pvt_thread_cond_init( ldap_pvt_thread_cond_t *cond ) return 0; } +int +ldap_pvt_thread_cond_destroy( ldap_pvt_thread_cond_t *cond ) +{ + return 0; +} + int ldap_pvt_thread_cond_signal( ldap_pvt_thread_cond_t *cond ) {