We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 075820a commit 7debbd7Copy full SHA for 7debbd7
storage/innobase/include/ut0counter.h
@@ -108,14 +108,14 @@ struct ib_counter_t {
108
109
private:
110
/** Atomic which occupies whole CPU cache line */
111
- struct MY_ALIGNED(CACHE_LINE_SIZE) ib_counter_element_t {
+ union ib_counter_element_t {
112
std::atomic<Type> value;
113
- byte padding[CACHE_LINE_SIZE - sizeof(value)];
+ byte padding[CACHE_LINE_SIZE];
114
};
115
static_assert(sizeof(ib_counter_element_t) == CACHE_LINE_SIZE, "");
116
117
/** Array of counter elements */
118
- ib_counter_element_t m_counter[N];
+ MY_ALIGNED(CACHE_LINE_SIZE) ib_counter_element_t m_counter[N];
119
120
121
#endif /* ut0counter_h */
0 commit comments