Add (back in) destroy functions...

This commit is contained in:
Kurt Zeilenga 1999-01-29 06:05:18 +00:00
parent 30d106079d
commit 26d29bb2f4
4 changed files with 29 additions and 2 deletions

View File

@ -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) {

View File

@ -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 );
}

View File

@ -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 )

View File

@ -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 )
{