+/* The DB view is always consistent because all writes are wrapped in
+ * the wmutex. Finer-grained locks aren't necessary.
+ */
+#ifndef LAZY_LOCKS
+#define LAZY_LOCKS 1
+#endif
+#if LAZY_LOCKS
+#define LAZY_MUTEX_LOCK(x)
+#define LAZY_MUTEX_UNLOCK(x)
+#define LAZY_RWLOCK_UNLOCK(x)
+#define LAZY_RWLOCK_WRLOCK(x)
+#define LAZY_RWLOCK_RDLOCK(x)
+#define LAZY_RWLOCK_DEF(x)
+#define LAZY_RWLOCK_INIT(x,y)
+#define LAZY_RWLOCK_DESTROY(x)
+#else
+#define LAZY_MUTEX_LOCK(x) pthread_mutex_lock(x)
+#define LAZY_MUTEX_UNLOCK(x) pthread_mutex_unlock(x)
+#define LAZY_RWLOCK_UNLOCK(x) pthread_rwlock_unlock(x)
+#define LAZY_RWLOCK_WRLOCK(x) pthread_rwlock_wrlock(x)
+#define LAZY_RWLOCK_RDLOCK(x) pthread_rwlock_rdlock(x)
+#define LAZY_RWLOCK_DEF(x) pthread_rwlock_t x
+#define LAZY_RWLOCK_INIT(x,y) pthread_rwlock_init(x,y)
+#define LAZY_RWLOCK_DESTROY(x) pthread_rwlock_destroy(x)
+#endif
+