X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftdb2%2Fprivate.h;h=26ca7b3081b279d5d5db07fadee5a712e3bdd27a;hb=670ba98f74b52df541d153eeab9d3310932e75cd;hp=b801ffaf828f54b112a0116c436666e20da73461;hpb=b2555a868e3ee58d1b31f9558e3623d49ed2b2f1;p=ccan diff --git a/ccan/tdb2/private.h b/ccan/tdb2/private.h index b801ffaf..26ca7b30 100644 --- a/ccan/tdb2/private.h +++ b/ccan/tdb2/private.h @@ -463,6 +463,12 @@ enum TDB_ERROR tdb_read_convert(struct tdb_context *tdb, tdb_off_t off, void tdb_inc_seqnum(struct tdb_context *tdb); /* lock.c: */ +/* Print message because another tdb owns a lock we want. */ +enum TDB_ERROR owner_conflict(struct tdb_context *tdb, const char *call); + +/* If we fork, we no longer really own locks. */ +bool check_lock_pid(struct tdb_context *tdb, const char *call, bool log); + /* Lock/unlock a range of hashes. */ enum TDB_ERROR tdb_lock_hashes(struct tdb_context *tdb, tdb_off_t hash_lock, tdb_len_t hash_range, @@ -639,8 +645,10 @@ int tdb1_check(struct tdb_context *tdb, /* tdb1_open.c: */ int tdb1_new_database(struct tdb_context *tdb, - struct tdb_attribute_tdb1_hashsize *hashsize); -enum TDB_ERROR tdb1_open(struct tdb_context *tdb); + struct tdb_attribute_tdb1_hashsize *hashsize, + struct tdb_attribute_tdb1_max_dead *max_dead); +enum TDB_ERROR tdb1_open(struct tdb_context *tdb, + struct tdb_attribute_tdb1_max_dead *max_dead); /* tdb1_io.c: */ enum TDB_ERROR tdb1_probe_length(struct tdb_context *tdb);