X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-bdb%2Fproto-bdb.h;h=1a50eef2beb931e114c696523cffdd825d7dffc7;hb=5d9479a3e82cc1ed5260f26878bf710a3b65faec;hp=86d7e1bf5d5b2c2d0723e086eb1588fa6c87c4a8;hpb=713e6beb8d0ab8e3493f482f16fe4c42ebffe1ee;p=openldap diff --git a/servers/slapd/back-bdb/proto-bdb.h b/servers/slapd/back-bdb/proto-bdb.h index 86d7e1bf5d..1a50eef2be 100644 --- a/servers/slapd/back-bdb/proto-bdb.h +++ b/servers/slapd/back-bdb/proto-bdb.h @@ -58,9 +58,9 @@ bdb_db_cache( * dn2entry.c */ int bdb_dn2entry_rw LDAP_P(( BackendDB *be, DB_TXN *tid, - struct berval *dn, Entry **e, Entry **matched, int flags, int rw )); -#define bdb_dn2entry_r(be, tid, dn, e, m, f) bdb_dn2entry_rw((be), (tid), (dn), (e), (m), (f), 0) -#define bdb_dn2entry_w(be, tid, dn, e, m, f) bdb_dn2entry_rw((be), (tid), (dn), (e), (m), (f), 1) + struct berval *dn, Entry **e, Entry **matched, int flags, int rw , u_int32_t locker, DB_LOCK *lock)); +#define bdb_dn2entry_r(be, tid, dn, e, m, f, locker, lock) bdb_dn2entry_rw((be), (tid), (dn), (e), (m), (f), 0, locker, lock) +#define bdb_dn2entry_w(be, tid, dn, e, m, f, locker, lock) bdb_dn2entry_rw((be), (tid), (dn), (e), (m), (f), 1, locker, lock) /* * dn2id.c @@ -69,14 +69,16 @@ int bdb_dn2id( BackendDB *be, DB_TXN *tid, struct berval *dn, - ID *id ); + ID *id, + int flags ); int bdb_dn2id_matched( BackendDB *be, DB_TXN *tid, struct berval *dn, ID *id, - ID *id2 ); + ID *id2, + int flags ); int bdb_dn2id_add( BackendDB *be, @@ -93,7 +95,8 @@ int bdb_dn2id_delete( int bdb_dn2id_children( BackendDB *be, DB_TXN *tid, - struct berval *dn ); + struct berval *dn, + int flags ); int bdb_dn2idl( @@ -120,7 +123,8 @@ int bdb_filter_candidates( Backend *be, Filter *f, ID *ids, - ID *tmp ); + ID *tmp, + ID *stack ); /* * group.c @@ -151,9 +155,11 @@ int bdb_id2entry_rw( DB_TXN *tid, ID id, Entry **e, - int rw ); -#define bdb_id2entry_r(be, tid, id, e) bdb_id2entry_rw((be), (tid), (id), (e), 0) -#define bdb_id2entry_w(be, tid, id, e) bdb_id2entry_rw((be), (tid), (id), (e), 1) + int rw, + u_int32_t locker, + DB_LOCK *lock ); +#define bdb_id2entry_r(be, tid, id, e, locker, lock) bdb_id2entry_rw((be), (tid), (id), (e), 0, locker, lock) +#define bdb_id2entry_w(be, tid, id, e, locker, lock) bdb_id2entry_rw((be), (tid), (id), (e), 1, locker, lock) void bdb_entry_free ( Entry *e ); @@ -244,6 +250,11 @@ int bdb_index_entry LDAP_P(( Backend *be, DB_TXN *t, #define bdb_index_entry_del(be,t,e,ap) \ bdb_index_entry((be),(t),SLAP_INDEX_DELETE_OP,(e),(ap)) +/* + * init.c + */ +extern struct berval bdb_uuid; + /* * key.c */ @@ -295,13 +306,19 @@ BI_op_extended bdb_exop_passwd; */ void bdb_cache_entry_commit( Entry *e ); -void bdb_cache_return_entry_rw( Cache *cache, Entry *e, int rw ); -#define bdb_cache_return_entry_r(c, e) bdb_cache_return_entry_rw((c), (e), 0) -#define bdb_cache_return_entry_w(c, e) bdb_cache_return_entry_rw((c), (e), 1) +void bdb_cache_return_entry_rw( DB_ENV *env, Cache *cache, Entry *e, int rw, DB_LOCK *lock ); +#define bdb_cache_return_entry_r(env, c, e, l) bdb_cache_return_entry_rw((env), (c), (e), 0, (l)) +#define bdb_cache_return_entry_w(env, c, e, l) bdb_cache_return_entry_rw((env), (c), (e), 1, (l)) +void bdb_unlocked_cache_return_entry_rw( Cache *cache, Entry *e, int rw ); +#define bdb_unlocked_cache_return_entry_r( c, e ) bdb_unlocked_cache_return_entry_rw((c), (e), 0) +#define bdb_unlocked_cache_return_entry_w( c, e ) bdb_unlocked_cache_return_entry_rw((c), (e), 1) int bdb_cache_add_entry_rw( - Cache *cache, - Entry *e, - int rw + DB_ENV *env, + Cache *cache, + Entry *e, + int rw, + u_int32_t locker, + DB_LOCK *lock ); int bdb_cache_update_entry( Cache *cache, @@ -313,9 +330,12 @@ ID bdb_cache_find_entry_ndn2id( struct berval *ndn ); Entry* bdb_cache_find_entry_id( - Cache *cache, - ID id, - int rw + DB_ENV *env, + Cache *cache, + ID id, + int rw, + u_int32_t locker, + DB_LOCK *lock ); int bdb_cache_delete_entry( Cache *cache, @@ -323,6 +343,18 @@ int bdb_cache_delete_entry( ); void bdb_cache_release_all( Cache *cache ); +#ifdef BDB_REUSE_LOCKERS + +int bdb_locker_id( Operation *op, DB_ENV *env, int *locker ); + +#endif + +#ifdef HAVE_EBCDIC +char *ebcdic_dberror( int rc ); + +#define db_strerror(x) ebcdic_dberror(x) +#endif + LDAP_END_DECL #endif /* _PROTO_BDB_H */