diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-10-18 08:52:16 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-10-18 08:52:16 +0000 |
commit | f4d9600e6813f151350d9a89749ee4d12b62b842 (patch) | |
tree | 54ed914a9efc59f19a75ad572d70e794c48d4626 /source3/tdb/spinlock.h | |
parent | 8c4e25a331bb9e72374202378340b2acd525adce (diff) | |
download | samba-f4d9600e6813f151350d9a89749ee4d12b62b842.tar.gz samba-f4d9600e6813f151350d9a89749ee4d12b62b842.tar.bz2 samba-f4d9600e6813f151350d9a89749ee4d12b62b842.zip |
fixed spinlocks in tdb
I still wouldn't recommend them, but at least they now work
(This used to be commit 76992e7d1655ed15d61254f2be651db020ec4f5e)
Diffstat (limited to 'source3/tdb/spinlock.h')
-rw-r--r-- | source3/tdb/spinlock.h | 4 |
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 |