]> git.sur5r.net Git - openldap/commitdiff
Don't set bdb yield with NO_THREADS
authorHoward Chu <hyc@openldap.org>
Thu, 19 Sep 2002 01:38:00 +0000 (01:38 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 19 Sep 2002 01:38:00 +0000 (01:38 +0000)
servers/slapd/back-bdb/init.c

index 1b1100ba539aa46e807c4a6cdaab5961ddc71ef7..d8a9e683d2d112ecf2602d0be0b9a0b2027440a9 100644 (file)
@@ -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 ];