Convert accumbytes in prof_accum_t to C11 atomics, when possible

This commit is contained in:
David Goldblatt
2017-04-04 18:08:58 -07:00
committed by David Goldblatt
parent 55d992c48c
commit 30d74db08e
3 changed files with 12 additions and 6 deletions

View File

@@ -1758,8 +1758,10 @@ prof_accum_init(tsdn_t *tsdn, prof_accum_t *prof_accum) {
WITNESS_RANK_PROF_ACCUM)) {
return true;
}
#endif
prof_accum->accumbytes = 0;
#else
atomic_store_u64(&prof_accum->accumbytes, 0, ATOMIC_RELAXED);
#endif
return false;
}