From fac26f073b2ee6740285b5ddb39b6358885cbcb8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 15 Jun 2000 15:30:37 +0000 Subject: support both read and write locks inside the tdb (This used to be commit d0a1f96e0f699f8e3ceb0e0d826423cd643803e7) --- source3/tdb/tdb.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source3') 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 */ -- cgit