提交 b86ae5c7 编写于 作者: T tschatzl

8033545: Missing volatile specifier in Bitmap::par_put_range_within_word

Summary: The method Bitmap::par_put_range_within_word reloads the original value during a CAS, which may be optimized away. Instead of reloading, use the value returned by Atomic::cmpxchg_ptr() for further processing.
Reviewed-by: tschatzl, brutisso, tonyp
Contributed-by: NMatthias Braun <matthia.braun@sap.com>
上级 ad2f7ff6
......@@ -107,7 +107,7 @@ void BitMap::par_put_range_within_word(idx_t beg, idx_t end, bool value) {
while (true) {
intptr_t res = Atomic::cmpxchg_ptr(nw, pw, w);
if (res == w) break;
w = *pw;
w = res;
nw = value ? (w | ~mr) : (w & mr);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册