summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/include/tdb.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-03-30 04:52:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:59:20 -0500
commit3387746c4517d6766146080980ac467b72b62316 (patch)
treebe82b9daf54552306123f38d88330460825dfcf4 /source4/lib/tdb/include/tdb.h
parent86971ff3b930a93de55aae00fe66f3d1d10dbcb4 (diff)
downloadsamba-3387746c4517d6766146080980ac467b72b62316.tar.gz
samba-3387746c4517d6766146080980ac467b72b62316.tar.bz2
samba-3387746c4517d6766146080980ac467b72b62316.zip
r14799: added a tdb_get_seqnum() call, and the TDB_SEQNUM flag. This allows
for an extremely lightweight test to see if a tdb has possibly changed. (This used to be commit f325ba605ccceca63712c0f2c98961e35e437b3d)
Diffstat (limited to 'source4/lib/tdb/include/tdb.h')
-rw-r--r--source4/lib/tdb/include/tdb.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/lib/tdb/include/tdb.h b/source4/lib/tdb/include/tdb.h
index c116f29fc1..ddde17850b 100644
--- a/source4/lib/tdb/include/tdb.h
+++ b/source4/lib/tdb/include/tdb.h
@@ -46,6 +46,7 @@ extern "C" {
#define TDB_CONVERT 16 /* convert endian (internal use) */
#define TDB_BIGENDIAN 32 /* header is big-endian (internal use) */
#define TDB_NOSYNC 64 /* don't use synchronous transactions */
+#define TDB_SEQNUM 128 /* maintain a sequence number */
#define TDB_ERRCODE(code, ret) ((tdb->ecode = (code)), ret)
@@ -109,6 +110,7 @@ int tdb_transaction_start(struct tdb_context *tdb);
int tdb_transaction_commit(struct tdb_context *tdb);
int tdb_transaction_cancel(struct tdb_context *tdb);
int tdb_transaction_recover(struct tdb_context *tdb);
+int tdb_get_seqnum(struct tdb_context *tdb);
/* Low level locking functions: use with care */
int tdb_chainlock(struct tdb_context *tdb, TDB_DATA key);