diff --git a/src/dict.h b/src/dict.h index 27b37233c..f192f9c6b 100644 --- a/src/dict.h +++ b/src/dict.h @@ -127,12 +127,14 @@ struct dict { long rehashidx; /* rehashing not in progress if rehashidx == -1 */ - /* Keep small vars at end for optimal (minimal) struct padding */ - unsigned pauserehash : 15; /* If >0 rehashing is paused */ + /* Note: pauserehash is a full unsigned so iterator increments + * don't perform RMW on the same storage unit as other bitfields. */ + unsigned pauserehash; /* If >0 rehashing is paused */ - unsigned useStoredKeyApi : 1; /* See comment of storedHashFunction above */ + /* Keep small vars at end for optimal (minimal) struct padding */ signed char ht_size_exp[2]; /* exponent of size. (size = 1<0 automatic resizing is disallowed (<0 indicates coding error) */ + signed pauseAutoResize: 15; /* If >0 automatic resizing is disallowed (<0 indicates coding error) */ + unsigned useStoredKeyApi: 1; /* See comment of storedHashFunction above */ void *metadata[]; };