]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb/tdb_private.h
tdb: cleanup: tdb_nest_lock/tdb_nest_unlock
[ccan] / ccan / tdb / tdb_private.h
index b211662c4b867d05744703598e36e3d09f35be5b..33445fc5a14072d16c7f92d07ee806490c68ebaa 100644 (file)
@@ -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,