X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Ftdb1.h;h=54b6d936d49b67de18aecd95b121a56ed616d977;hp=4b0e454d1b7141c90a1481a4581c7a0850155b77;hb=8571daf007f03a2888566dbaae8a5849ffba60f3;hpb=cc2d609dfca7192305ad477b8c2b52cfdc1aa9be diff --git a/ccan/tdb2/tdb1.h b/ccan/tdb2/tdb1.h index 4b0e454d..54b6d936 100644 --- a/ccan/tdb2/tdb1.h +++ b/ccan/tdb2/tdb1.h @@ -38,55 +38,8 @@ void tdb1_set_max_dead(struct tdb_context *tdb, int max_dead); -int tdb1_parse_record(struct tdb_context *tdb, TDB_DATA key, - int (*parser)(TDB_DATA key, TDB_DATA data, - void *private_data), - void *private_data); - -TDB_DATA tdb1_firstkey(struct tdb_context *tdb); - -TDB_DATA tdb1_nextkey(struct tdb_context *tdb, TDB_DATA key); - -int tdb1_lockall(struct tdb_context *tdb); - -int tdb1_unlockall(struct tdb_context *tdb); - -int tdb1_lockall_read(struct tdb_context *tdb); - -int tdb1_unlockall_read(struct tdb_context *tdb); - -int tdb1_transaction_start(struct tdb_context *tdb); - -int tdb1_transaction_prepare_commit(struct tdb_context *tdb); - -int tdb1_transaction_commit(struct tdb_context *tdb); - -int tdb1_get_seqnum(struct tdb_context *tdb); - -void tdb1_increment_seqnum_nonblock(struct tdb_context *tdb); - uint64_t tdb1_incompatible_hash(const void *key, size_t len, uint64_t seed, void *); -int tdb1_check(struct tdb_context *tdb, - int (*check) (TDB_DATA key, TDB_DATA data, void *private_data), - void *private_data); - /* @} ******************************************************************/ -/* Low level locking functions: use with care */ -int tdb1_chainlock(struct tdb_context *tdb, TDB_DATA key); -int tdb1_chainunlock(struct tdb_context *tdb, TDB_DATA key); -int tdb1_chainlock_read(struct tdb_context *tdb, TDB_DATA key); -int tdb1_chainunlock_read(struct tdb_context *tdb, TDB_DATA key); - - -/* wipe and repack */ -int tdb1_wipe_all(struct tdb_context *tdb); -int tdb1_repack(struct tdb_context *tdb); - -/* Debug functions. Not used in production. */ -char *tdb1_summary(struct tdb_context *tdb); - -extern TDB_DATA tdb1_null; - #endif /* tdb1.h */