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