]> git.sur5r.net Git - openldap/commitdiff
Clean up valid flag: _VALUE -> _VALID.
authorKurt Zeilenga <kurt@openldap.org>
Tue, 27 Apr 1999 05:18:21 +0000 (05:18 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 27 Apr 1999 05:18:21 +0000 (05:18 +0000)
include/ldap_pvt_thread.h
libraries/libldap_r/rdwr.c

index 2e64323996860d81f1d85614e2e8742dd36ed6d8..77b19031bad0b283e00535007cb161f74e491a6b 100644 (file)
@@ -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;
index 128bb16556702516c92083d8a5740fa99e5a7890..294fe8054f1dc256024b0a7ddb8f9d3217300187 100644 (file)
@@ -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 );