Skip to content
Snippets Groups Projects
Commit 15d1b4d5 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

cleanup locking

parent 09e16742
No related branches found
No related tags found
No related merge requests found
......@@ -105,19 +105,11 @@ done:;
/* wait for all other ops to release the connection */
retry_lock:;
switch ( ldap_pvt_thread_mutex_trylock( &li->conn_mutex ) ) {
case LDAP_PVT_THREAD_EBUSY:
default:
ldap_pvt_thread_mutex_lock( &li->conn_mutex );
if ( lc->lc_refcnt > 1 ) {
ldap_pvt_thread_mutex_unlock( &li->conn_mutex );
ldap_pvt_thread_yield();
goto retry_lock;
case 0:
if ( lc->lc_refcnt > 1 ) {
ldap_pvt_thread_mutex_unlock( &li->conn_mutex );
ldap_pvt_thread_yield();
goto retry_lock;
}
break;
}
assert( lc->lc_refcnt == 1 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment