summaryrefslogtreecommitdiff
path: root/lib/tdb/common/tdb_private.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2010-02-17 12:34:26 +1030
committerRusty Russell <rusty@rustcorp.com.au>2010-02-17 12:34:26 +1030
commitfba42f1fb4f81b8913cce5a23ca5350ba45f40e1 (patch)
treeede1d6f29fcb7af17af8b9010ef9247a9e397321 /lib/tdb/common/tdb_private.h
parentb754f61d235bdc3e410b60014d6be4072645e16f (diff)
downloadsamba-fba42f1fb4f81b8913cce5a23ca5350ba45f40e1.tar.gz
samba-fba42f1fb4f81b8913cce5a23ca5350ba45f40e1.tar.bz2
samba-fba42f1fb4f81b8913cce5a23ca5350ba45f40e1.zip
tdb: cleanup: tdb_have_extra_locks() helper
In many places we check whether locks are held: add a helper to do this. The _tdb_lockall() case has already checked for the allrecord lock, so the extra work done by tdb_have_extra_locks() is merely redundant. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/tdb/common/tdb_private.h')
-rw-r--r--lib/tdb/common/tdb_private.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/tdb/common/tdb_private.h b/lib/tdb/common/tdb_private.h
index 4e4816bd4a..1af975de6e 100644
--- a/lib/tdb/common/tdb_private.h
+++ b/lib/tdb/common/tdb_private.h
@@ -234,6 +234,7 @@ int tdb_brlock(struct tdb_context *tdb,
enum tdb_lock_flags flags);
int tdb_brunlock(struct tdb_context *tdb,
int rw_type, tdb_off_t offset, size_t len);
+bool tdb_have_extra_locks(struct tdb_context *tdb);
int tdb_transaction_lock(struct tdb_context *tdb, int ltype);
int tdb_transaction_unlock(struct tdb_context *tdb, int ltype);
int tdb_brlock_upgrade(struct tdb_context *tdb, tdb_off_t offset, size_t len);