Skip to content
Snippets Groups Projects
Commit 0eb19657 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Add missing -DNO_THREADS trylock and make minor change to TLS

in attempt to get it work with GNU PTH.
parent c6e4ad6c
No related branches found
No related tags found
No related merge requests found
......@@ -66,9 +66,9 @@ static ldap_pvt_thread_mutex_t tls_mutexes[CRYPTO_NUM_LOCKS];
static void tls_locking_cb( int mode, int type, const char *file, int line )
{
if ( mode & CRYPTO_LOCK ) {
ldap_pvt_thread_mutex_lock( tls_mutexes+type );
ldap_pvt_thread_mutex_lock( &tls_mutexes[type] );
} else {
ldap_pvt_thread_mutex_unlock( tls_mutexes+type );
ldap_pvt_thread_mutex_unlock( &tls_mutexes[type] );
}
}
......@@ -83,7 +83,7 @@ static void tls_init_threads( void )
int i;
for( i=0; i< CRYPTO_NUM_LOCKS ; i++ ) {
ldap_pvt_thread_mutex_init( tls_mutexes+i );
ldap_pvt_thread_mutex_init( &tls_mutexes[i] );
}
CRYPTO_set_locking_callback( tls_locking_cb );
/* FIXME: the thread id should be added somehow... */
......
......@@ -126,6 +126,12 @@ ldap_int_thread_mutex_lock( ldap_int_thread_mutex_t *mutex )
return 0;
}
int
ldap_int_thread_mutex_trylock( ldap_int_thread_mutex_t *mutex )
{
return 0;
}
int
ldap_int_thread_mutex_unlock( ldap_int_thread_mutex_t *mutex )
{
......
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