aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/utilities
diff options
context:
space:
mode:
authortschatzl <none@none>2014-02-10 10:34:52 +0100
committertschatzl <none@none>2014-02-10 10:34:52 +0100
commit58ba2bad8edeb4d6bd563dfdf5848b65641ea329 (patch)
tree8940acf6546cba1ff790ebdccaf112f23de213cc /src/share/vm/utilities
parentb68741c431122aabfc49e98733fd6e3441e74ce3 (diff)
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: Matthias Braun <matthia.braun@sap.com>
Diffstat (limited to 'src/share/vm/utilities')
-rw-r--r--src/share/vm/utilities/bitMap.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/share/vm/utilities/bitMap.cpp b/src/share/vm/utilities/bitMap.cpp
index b67604887..8431395a6 100644
--- a/src/share/vm/utilities/bitMap.cpp
+++ b/src/share/vm/utilities/bitMap.cpp
@@ -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);
}
}