tdb2: move transaction lock
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 13 Sep 2011 21:41:13 +0000 (07:11 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 13 Sep 2011 21:41:13 +0000 (07:11 +0930)
Make it the same offset as TDB1.  This isn't strictly necessary, but
it would allow for total unification later, since TDB1 and TDB2's
transaction code is otherwise completely compatible.

(Imported from CCAN commit de432e8f857ce23bccde7c6ffa3e7e21456df18b)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
lib/tdb2/private.h

index a18e02b720305eaf9a70f2f85e0105c2a91f1c7e..3f3860c42b453ba5609993df74b22b8ebc4118f1 100644 (file)
@@ -89,10 +89,10 @@ typedef int tdb_bool_err;
 
 /* Prevent others from opening the file. */
 #define TDB_OPEN_LOCK 0
-/* Doing a transaction. */
-#define TDB_TRANSACTION_LOCK 1
 /* Expanding file. */
 #define TDB_EXPANSION_LOCK 2
+/* Doing a transaction. */
+#define TDB_TRANSACTION_LOCK 8
 /* Hash chain locks. */
 #define TDB_HASH_LOCK_START 64