X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb%2Ftdb_private.h;h=33445fc5a14072d16c7f92d07ee806490c68ebaa;hp=b211662c4b867d05744703598e36e3d09f35be5b;hb=acf1a21e440b2908df0ce57c48dab1aca9e23cad;hpb=1d03cc6df3b4f5c8174096ae3411527f266f9a97;ds=sidebyside diff --git a/ccan/tdb/tdb_private.h b/ccan/tdb/tdb_private.h index b211662c..33445fc5 100644 --- a/ccan/tdb/tdb_private.h +++ b/ccan/tdb/tdb_private.h @@ -183,7 +183,7 @@ struct tdb_header { }; struct tdb_lock_type { - int list; + uint32_t off; uint32_t count; uint32_t ltype; }; @@ -256,6 +256,10 @@ int tdb_munmap(struct tdb_context *tdb); void tdb_mmap(struct tdb_context *tdb); int tdb_lock(struct tdb_context *tdb, int list, int ltype); int tdb_lock_nonblock(struct tdb_context *tdb, int list, int ltype); +int tdb_nest_lock(struct tdb_context *tdb, uint32_t offset, int ltype, + enum tdb_lock_flags flags); +int tdb_nest_unlock(struct tdb_context *tdb, uint32_t offset, int ltype, + bool mark_lock); int tdb_unlock(struct tdb_context *tdb, int list, int ltype); int tdb_brlock(struct tdb_context *tdb, int rw_type, tdb_off_t offset, size_t len,