]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb/tdb_private.h
tdb: cleanup: rename GLOBAL_LOCK to OPEN_LOCK.
[ccan] / ccan / tdb / tdb_private.h
index 66954ab013f1ae0671462306a435773842eba8bc..975892ec2d1bfd6637153973955a207f14c4d741 100644 (file)
 
 /* #define TDB_TRACE 1 */
 
+#ifndef __STRING
+#define __STRING(x)    #x
+#endif
+
+#ifndef __STRINGSTRING
+#define __STRINGSTRING(x) __STRING(x)
+#endif
+
+#ifndef __location__
+#define __location__ __FILE__ ":" __STRINGSTRING(__LINE__)
+#endif
+
 #if HAVE_GETPAGESIZE
 #define getpagesize() 0x2000
 #endif
@@ -122,7 +134,7 @@ void tdb_trace_2rec_retrec(struct tdb_context *tdb, const char *op,
 #endif /* !TDB_TRACE */
 
 /* lock offsets */
-#define GLOBAL_LOCK      0
+#define OPEN_LOCK        0
 #define ACTIVE_LOCK      4
 #define TRANSACTION_LOCK 8