summaryrefslogtreecommitdiff
path: root/source3/tdb/spinlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'source3/tdb/spinlock.h')
-rw-r--r--source3/tdb/spinlock.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/tdb/spinlock.h b/source3/tdb/spinlock.h
index 8b0e833ff5..967fe37457 100644
--- a/source3/tdb/spinlock.h
+++ b/source3/tdb/spinlock.h
@@ -39,6 +39,8 @@ int tdb_spinunlock(TDB_CONTEXT *tdb, int list, int rw_type);
int tdb_create_rwlocks(int fd, unsigned int hash_size);
int tdb_clear_spinlocks(TDB_CONTEXT *tdb);
+#define TDB_SPINLOCK_SIZE(hash_size) (((hash_size) + 1) * sizeof(tdb_rwlock_t))
+
#else /* !USE_SPINLOCKS */
#if 0
#define tdb_create_rwlocks(fd, hash_size) 0
@@ -50,6 +52,8 @@ int tdb_spinunlock(TDB_CONTEXT *tdb, int list, int rw_type);
int tdb_create_rwlocks(int fd, unsigned int hash_size);
#endif
int tdb_clear_spinlocks(TDB_CONTEXT *tdb);
+#define TDB_SPINLOCK_SIZE(hash_size) 0
+
#endif
#endif