From: Kurt Zeilenga Date: Tue, 27 Apr 1999 05:18:21 +0000 (+0000) Subject: Clean up valid flag: _VALUE -> _VALID. X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~133 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=504fac55c8e777f8c6126922026bc8ab30de85c4;p=openldap Clean up valid flag: _VALUE -> _VALID. --- diff --git a/include/ldap_pvt_thread.h b/include/ldap_pvt_thread.h index 2e64323996..77b19031ba 100644 --- a/include/ldap_pvt_thread.h +++ b/include/ldap_pvt_thread.h @@ -108,11 +108,11 @@ LDAP_BEGIN_DECL typedef thread_t ldap_pvt_thread_t; typedef mon_t ldap_pvt_thread_mutex_t; -struct lwpcv { +struct ldap_pvt_thread_lwp_cv { int lcv_created; cv_t lcv_cv; }; -typedef struct lwpcv ldap_pvt_thread_cond_t; +typedef struct ldap_pvt_thread_lwp_cv ldap_pvt_thread_cond_t; #define HAVE_REENTRANT_FUNCTIONS 1 @@ -241,7 +241,7 @@ typedef struct ldap_pvt_thread_rdwr_var { ldap_pvt_thread_cond_t ltrw_read; /* wait for read */ ldap_pvt_thread_cond_t ltrw_write; /* wait for write */ int ltrw_valid; -#define LDAP_PVT_THREAD_RDWR_VALUE 0x0bad +#define LDAP_PVT_THREAD_RDWR_VALID 0x0bad int ltrw_r_active; int ltrw_w_active; int ltrw_r_wait; diff --git a/libraries/libldap_r/rdwr.c b/libraries/libldap_r/rdwr.c index 128bb16556..294fe8054f 100644 --- a/libraries/libldap_r/rdwr.c +++ b/libraries/libldap_r/rdwr.c @@ -34,14 +34,14 @@ ldap_pvt_thread_rdwr_init( ldap_pvt_thread_rdwr_t *rw ) ldap_pvt_thread_cond_init( &rw->ltrw_read ); ldap_pvt_thread_cond_init( &rw->ltrw_write ); - rw->ltrw_valid = LDAP_PVT_THREAD_RDWR_VALUE; + rw->ltrw_valid = LDAP_PVT_THREAD_RDWR_VALID; return 0; } int ldap_pvt_thread_rdwr_destroy( ldap_pvt_thread_rdwr_t *rw ) { - if( rw->ltrw_valid != LDAP_PVT_THREAD_RDWR_VALUE ) + if( rw->ltrw_valid != LDAP_PVT_THREAD_RDWR_VALID ) return LDAP_PVT_THREAD_EINVAL; ldap_pvt_thread_mutex_lock( &rw->ltrw_mutex ); @@ -71,7 +71,7 @@ ldap_pvt_thread_rdwr_destroy( ldap_pvt_thread_rdwr_t *rw ) int ldap_pvt_thread_rdwr_rlock( ldap_pvt_thread_rdwr_t *rw ) { - if( rw->ltrw_valid != LDAP_PVT_THREAD_RDWR_VALUE ) + if( rw->ltrw_valid != LDAP_PVT_THREAD_RDWR_VALID ) return LDAP_PVT_THREAD_EINVAL; ldap_pvt_thread_mutex_lock( &rw->ltrw_mutex ); @@ -98,7 +98,7 @@ int ldap_pvt_thread_rdwr_rlock( ldap_pvt_thread_rdwr_t *rw ) int ldap_pvt_thread_rdwr_rtrylock( ldap_pvt_thread_rdwr_t *rw ) { - if( rw->ltrw_valid != LDAP_PVT_THREAD_RDWR_VALUE ) + if( rw->ltrw_valid != LDAP_PVT_THREAD_RDWR_VALID ) return LDAP_PVT_THREAD_EINVAL; ldap_pvt_thread_mutex_lock( &rw->ltrw_mutex ); @@ -117,7 +117,7 @@ int ldap_pvt_thread_rdwr_rtrylock( ldap_pvt_thread_rdwr_t *rw ) int ldap_pvt_thread_rdwr_runlock( ldap_pvt_thread_rdwr_t *rw ) { - if( rw->ltrw_valid != LDAP_PVT_THREAD_RDWR_VALUE ) + if( rw->ltrw_valid != LDAP_PVT_THREAD_RDWR_VALID ) return LDAP_PVT_THREAD_EINVAL; ldap_pvt_thread_mutex_lock( &rw->ltrw_mutex ); @@ -135,7 +135,7 @@ int ldap_pvt_thread_rdwr_runlock( ldap_pvt_thread_rdwr_t *rw ) int ldap_pvt_thread_rdwr_wlock( ldap_pvt_thread_rdwr_t *rw ) { - if( rw->ltrw_valid != LDAP_PVT_THREAD_RDWR_VALUE ) + if( rw->ltrw_valid != LDAP_PVT_THREAD_RDWR_VALID ) return LDAP_PVT_THREAD_EINVAL; ldap_pvt_thread_mutex_lock( &rw->ltrw_mutex ); @@ -160,7 +160,7 @@ int ldap_pvt_thread_rdwr_wlock( ldap_pvt_thread_rdwr_t *rw ) int ldap_pvt_thread_rdwr_wtrylock( ldap_pvt_thread_rdwr_t *rw ) { - if( rw->ltrw_valid != LDAP_PVT_THREAD_RDWR_VALUE ) + if( rw->ltrw_valid != LDAP_PVT_THREAD_RDWR_VALID ) return LDAP_PVT_THREAD_EINVAL; ldap_pvt_thread_mutex_lock( &rw->ltrw_mutex ); @@ -179,7 +179,7 @@ int ldap_pvt_thread_rdwr_wtrylock( ldap_pvt_thread_rdwr_t *rw ) int ldap_pvt_thread_rdwr_wunlock( ldap_pvt_thread_rdwr_t *rw ) { - if( rw->ltrw_valid != LDAP_PVT_THREAD_RDWR_VALUE ) + if( rw->ltrw_valid != LDAP_PVT_THREAD_RDWR_VALID ) return LDAP_PVT_THREAD_EINVAL; ldap_pvt_thread_mutex_lock( &rw->ltrw_mutex );