From 7db33f87a982243a2d014f9a14bd0fda695680ba Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 18 Jan 2002 13:28:07 +0000 Subject: [PATCH] Do deadlock detection on any conflict, instead of in a separate thread --- servers/slapd/back-bdb/init.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 844575409e..d71e329334 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -92,7 +92,7 @@ bdb_db_init( BackendDB *be ) return 0; } -#ifndef NO_THREADS +#if 0 /* ifndef NO_THREADS */ static void *lock_detect_task( void *arg ) { struct bdb_info *bdb = (struct bdb_info *) arg; @@ -171,6 +171,9 @@ bdb_db_open( BackendDB *be ) bdb->bi_dbenv->set_errpfx( bdb->bi_dbenv, be->be_suffix[0]->bv_val ); bdb->bi_dbenv->set_errcall( bdb->bi_dbenv, bdb_errcall ); +#ifndef NO_THREADS + bdb->bi_dbenv->set_lk_detect( bdb->bi_dbenv, bdb->bi_lock_detect ); +#endif #ifdef BDB_SUBDIRS { @@ -309,7 +312,7 @@ bdb_db_open( BackendDB *be ) rc = bdb_build_tree( be ); #endif -#ifndef NO_THREADS +#if 0 /* ifndef NO_THREADS */ if( bdb->bi_lock_detect != DB_LOCK_NORUN ) { /* listener as a separate THREAD */ rc = ldap_pvt_thread_create( &bdb->bi_lock_detect_tid, -- 2.39.5