From: Howard Chu Date: Thu, 19 Sep 2002 01:38:00 +0000 (+0000) Subject: Don't set bdb yield with NO_THREADS X-Git-Tag: NO_SLAP_OP_BLOCKS~960 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6fa0363d093a531be34ea97f38fbd34b12eae6ea;p=openldap Don't set bdb yield with NO_THREADS --- diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 1b1100ba53..d8a9e683d2 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -566,7 +566,12 @@ bdb_initialize( db_env_set_func_free( ber_memfree ); db_env_set_func_malloc( (db_malloc *)ber_memalloc ); db_env_set_func_realloc( (db_realloc *)ber_memrealloc ); +#ifndef NO_THREAD + /* This is a no-op on a NO_THREAD build. Leave the default + * alone so that BDB will sleep on interprocess conflicts. + */ db_env_set_func_yield( ldap_pvt_thread_yield ); +#endif { static char uuidbuf[ LDAP_LUTIL_UUIDSTR_BUFSIZE ];