commit | 1c3b83242da96f1d94ef3df34c399c1b984668b6 | [log] [tgz] |
---|---|---|
author | Olivier Houchard <ohouchard@haproxy.com> | Fri Jun 07 14:35:35 2019 +0200 |
committer | Olivier Houchard <cognet@ci0.org> | Fri Jun 07 14:45:44 2019 +0200 |
tree | 4d417b48f990c397e73ffa03bde1ed7ae936c72a | |
parent | 1bfd6020ce5f54120efd87906fd3675515ce4b8e [diff] |
MINOR: chunks: Make sure trash_size is only set once. The trash_size variable is shared by all threads, and is set by all threads, when alloc_trash_buffers() is called. To make sure it's set only once, to silence a harmless data race, use a CAS to set it, and only set it if it was 0.