X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-ldbm%2Fnextid.c;h=25841ca86d9fdef58247e9c85c8095ef987619c7;hb=2c87d24f31d29bed606b443ef2d8e881b87207c7;hp=e29d86b6ca4e9cb9930d361ade9f27ab19390280;hpb=d9cebead9f0edee451406384da7724dba8073780;p=openldap diff --git a/servers/slapd/back-ldbm/nextid.c b/servers/slapd/back-ldbm/nextid.c index e29d86b6ca..25841ca86d 100644 --- a/servers/slapd/back-ldbm/nextid.c +++ b/servers/slapd/back-ldbm/nextid.c @@ -102,7 +102,7 @@ next_id( Backend *be ) struct ldbminfo *li = (struct ldbminfo *) be->be_private; ID id; - pthread_mutex_lock( &li->li_nextid_mutex ); + ldap_pvt_thread_mutex_lock( &li->li_nextid_mutex ); /* first time in here since startup - try to read the nexid */ if ( li->li_nextid == NOID ) { @@ -128,7 +128,7 @@ next_id( Backend *be ) (void) next_id_write( be, li->li_nextid ); #endif - pthread_mutex_unlock( &li->li_nextid_mutex ); + ldap_pvt_thread_mutex_unlock( &li->li_nextid_mutex ); return( id ); } @@ -138,10 +138,10 @@ next_id_return( Backend *be, ID id ) #ifdef SLAPD_NEXTID_RETURN struct ldbminfo *li = (struct ldbminfo *) be->be_private; - pthread_mutex_lock( &li->li_nextid_mutex ); + ldap_pvt_thread_mutex_lock( &li->li_nextid_mutex ); if ( id != li->li_nextid - 1 ) { - pthread_mutex_unlock( &li->li_nextid_mutex ); + ldap_pvt_thread_mutex_unlock( &li->li_nextid_mutex ); return; } @@ -151,7 +151,7 @@ next_id_return( Backend *be, ID id ) (void) next_id_write( be, li->li_nextid ); #endif - pthread_mutex_unlock( &li->li_nextid_mutex ); + ldap_pvt_thread_mutex_unlock( &li->li_nextid_mutex ); #endif } @@ -161,7 +161,7 @@ next_id_get( Backend *be ) struct ldbminfo *li = (struct ldbminfo *) be->be_private; ID id; - pthread_mutex_lock( &li->li_nextid_mutex ); + ldap_pvt_thread_mutex_lock( &li->li_nextid_mutex ); /* first time in here since startup - try to read the nexid */ if ( li->li_nextid == NOID ) { @@ -178,7 +178,7 @@ next_id_get( Backend *be ) id = li->li_nextid; - pthread_mutex_unlock( &li->li_nextid_mutex ); + ldap_pvt_thread_mutex_unlock( &li->li_nextid_mutex ); return( id ); }