/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2000-2005 The OpenLDAP Foundation.
+ * Copyright 2000-2006 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#define DB_VERSION_FULL ((DB_VERSION_MAJOR << 24) | (DB_VERSION_MINOR << 16) | DB_VERSION_PATCH)
-#define BDB_SUBENTRIES 1
-
#define DN_BASE_PREFIX SLAP_INDEX_EQUALITY_PREFIX
#define DN_ONE_PREFIX '%'
#define DN_SUBTREE_PREFIX '@'
typedef struct bdb_cache {
int c_maxsize;
int c_cursize;
+ int c_minfree;
int c_eiused; /* EntryInfo's in use */
int c_leaves; /* EntryInfo leaf nodes */
EntryInfo c_dntree;
EntryInfo *c_lruhead; /* lru - add accessed entries here */
EntryInfo *c_lrutail; /* lru - rem lru entries from here */
ldap_pvt_thread_rdwr_t c_rwlock;
- ldap_pvt_thread_mutex_t lru_mutex;
+ ldap_pvt_thread_mutex_t lru_head_mutex;
+ ldap_pvt_thread_mutex_t lru_tail_mutex;
u_int32_t c_locker; /* used by lru cleaner */
#ifdef SLAP_ZONE_ALLOC
void *c_zctx;
DB *bdi_db;
};
+/* From ldap_rq.h */
+struct re_s;
+
struct bdb_info {
DB_ENV *bi_dbenv;
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;
+ 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;