mdbx: fix cache-aligned size for MDBX_reader.

Change-Id: I1e48dd279106daa629fbcd427ec841828799c8f6
This commit is contained in:
Leo Yuriev
2017-05-28 13:48:11 +03:00
parent bb5e1b43af
commit f945e8a062
2 changed files with 9 additions and 6 deletions

View File

@@ -2208,6 +2208,9 @@ static int mdbx_txn_renew0(MDBX_txn *txn, unsigned flags) {
}
}
STATIC_ASSERT(sizeof(MDBX_reader) == MDBX_CACHELINE_SIZE);
STATIC_ASSERT(
offsetof(MDBX_lockinfo, mti_numreaders) % MDBX_CACHELINE_SIZE == 0);
r = &env->me_lck->mti_readers[i];
/* Claim the reader slot, carefully since other code
* uses the reader table un-mutexed: First reset the