From: Howard Chu Date: Fri, 6 Jan 2006 04:06:18 +0000 (+0000) Subject: Cleanup task declarations X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~453 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a614a1c16e8e8e4e5aef6e34f9921d76ce987738;p=openldap Cleanup task declarations --- diff --git a/servers/slapd/back-bdb/back-bdb.h b/servers/slapd/back-bdb/back-bdb.h index 3e52ed01c3..4405d82f50 100644 --- a/servers/slapd/back-bdb/back-bdb.h +++ b/servers/slapd/back-bdb/back-bdb.h @@ -150,6 +150,9 @@ struct bdb_db_info { DB *bdi_db; }; +/* From ldap_rq.h */ +struct re_s; + struct bdb_info { DB_ENV *bi_dbenv; @@ -175,9 +178,9 @@ struct bdb_info { int bi_txn_cp; u_int32_t bi_txn_cp_min; u_int32_t bi_txn_cp_kbyte; - void *bi_txn_cp_task; - void *bi_index_task; - void *bi_cache_task; + struct re_s *bi_txn_cp_task; + struct re_s *bi_index_task; + struct re_s *bi_cache_task; int bi_lock_detect; long bi_shm_key; diff --git a/servers/slapd/back-bdb/cache.c b/servers/slapd/back-bdb/cache.c index e66836af61..30959448d3 100644 --- a/servers/slapd/back-bdb/cache.c +++ b/servers/slapd/back-bdb/cache.c @@ -644,14 +644,12 @@ bdb_cache_lru_add( if ( bdb->bi_cache_task ) { if ( !ldap_pvt_runqueue_isrunning( &slapd_rq, bdb->bi_cache_task )) { - struct re_s *task = bdb->bi_cache_task; - /* We want it to start right now */ - task->interval.tv_sec = 0; + bdb->bi_cache_task->interval.tv_sec = 0; ldap_pvt_runqueue_resched( &slapd_rq, bdb->bi_cache_task, 0 ); /* But don't try to reschedule it while it's running */ - task->interval.tv_sec = 3600; + bdb->bi_cache_task->interval.tv_sec = 3600; } } else { bdb->bi_cache_task = ldap_pvt_runqueue_insert( &slapd_rq, 3600,