diff options
author | Rickard Green <[email protected]> | 2015-06-08 16:40:39 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2015-06-08 16:40:39 +0200 |
commit | a6038dac4b387a0f18be7d18467bbf8f83e8c765 (patch) | |
tree | de093118c2e51d0e899e2af1259b1d2df6e62b4a /erts/emulator/beam/erl_process.c | |
parent | c1df511623b9a2a98d4d3862ae612c1ca9837da7 (diff) | |
download | otp-a6038dac4b387a0f18be7d18467bbf8f83e8c765.tar.gz otp-a6038dac4b387a0f18be7d18467bbf8f83e8c765.tar.bz2 otp-a6038dac4b387a0f18be7d18467bbf8f83e8c765.zip |
Fix lost aux work flags when setting multiple flags
All flags was not always set when setting multiple aux work
flags at once. This scenario is fortunately quite uncommon
and only caused further delay in memory deallocations.
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r-- | erts/emulator/beam/erl_process.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index ea63d20dfa..f4228e0026 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -1193,11 +1193,11 @@ set_aux_work_flags_wakeup_nob(ErtsSchedulerSleepInfo *ssi, ERTS_DBG_CHK_SSI_AUX_WORK(ssi); old_flgs = erts_atomic32_read_nob(&ssi->aux_work); - if ((old_flgs & flgs) == 0) { + if ((old_flgs & flgs) != flgs) { old_flgs = erts_atomic32_read_bor_nob(&ssi->aux_work, flgs); - if ((old_flgs & flgs) == 0) { + if ((old_flgs & flgs) != flgs) { #ifdef ERTS_SMP erts_sched_poke(ssi); #else @@ -1217,7 +1217,7 @@ set_aux_work_flags_wakeup_relb(ErtsSchedulerSleepInfo *ssi, old_flgs = erts_atomic32_read_bor_relb(&ssi->aux_work, flgs); - if ((old_flgs & flgs) == 0) { + if ((old_flgs & flgs) != flgs) { #ifdef ERTS_SMP erts_sched_poke(ssi); #else |