aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2012-12-11 16:46:48 +0100
committerRickard Green <[email protected]>2012-12-11 16:46:48 +0100
commit70debf33fadd0b897995365266bc6457abd8e62b (patch)
tree40d915813d83610d61e55a2eb7ed7c62a75907e2
parentc67947778ec1c18b680db6613b1d00dd46065956 (diff)
downloadotp-70debf33fadd0b897995365266bc6457abd8e62b.tar.gz
otp-70debf33fadd0b897995365266bc6457abd8e62b.tar.bz2
otp-70debf33fadd0b897995365266bc6457abd8e62b.zip
Fix bit set op of non-atomic fallback in atomic API
-rw-r--r--erts/emulator/beam/erl_threads.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_threads.h b/erts/emulator/beam/erl_threads.h
index 0e759a1eec..1dc3ffeb3c 100644
--- a/erts/emulator/beam/erl_threads.h
+++ b/erts/emulator/beam/erl_threads.h
@@ -2138,6 +2138,7 @@ erts_no_atomic_read_bset(erts_no_atomic_t *var,
erts_aint_t set)
{
erts_aint_t old = *var;
+ *var &= ~mask;
*var |= (mask & set);
return old;
}
@@ -2235,6 +2236,7 @@ erts_no_atomic32_read_bset(erts_no_atomic32_t *var,
erts_aint32_t set)
{
erts_aint32_t old = *var;
+ *var &= ~mask;
*var |= (mask & set);
return old;
}