summaryrefslogtreecommitdiff
path: root/source3/tdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-06-15 15:30:37 +0000
committerAndrew Tridgell <tridge@samba.org>2000-06-15 15:30:37 +0000
commitfac26f073b2ee6740285b5ddb39b6358885cbcb8 (patch)
tree0d735a00a66803800820bad6cda04e0326eb84d8 /source3/tdb
parent28be43dc814e592a3fafe7737ff2595d6a39b86d (diff)
downloadsamba-fac26f073b2ee6740285b5ddb39b6358885cbcb8.tar.gz
samba-fac26f073b2ee6740285b5ddb39b6358885cbcb8.tar.bz2
samba-fac26f073b2ee6740285b5ddb39b6358885cbcb8.zip
support both read and write locks inside the tdb
(This used to be commit d0a1f96e0f699f8e3ceb0e0d826423cd643803e7)
Diffstat (limited to 'source3/tdb')
-rw-r--r--source3/tdb/tdb.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/tdb/tdb.h b/source3/tdb/tdb.h
index 47254b5013..fd770cc5b9 100644
--- a/source3/tdb/tdb.h
+++ b/source3/tdb/tdb.h
@@ -37,6 +37,11 @@ typedef struct {
size_t dsize;
} TDB_DATA;
+struct tdb_lock_type {
+ unsigned count;
+ unsigned ltype;
+};
+
/* this is the context structure that is returned from a db open */
typedef struct {
char *name; /* the name of the database */
@@ -44,7 +49,7 @@ typedef struct {
int fd; /* open file descriptor for the database */
tdb_len map_size; /* how much space has been mapped */
int read_only; /* opened read-only */
- int *locked; /* set if we have a chain locked */
+ struct tdb_lock_type *locked; /* set if we have a chain locked */
int ecode; /* error code for last tdb error */
struct tdb_header header; /* a cached copy of the header */
unsigned flags; /* the flags passed to tdb_open */