]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: chunks: Make sure trash_size is only set once.
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 7 Jun 2019 12:35:35 +0000 (14:35 +0200)
committerOlivier Houchard <cognet@ci0.org>
Fri, 7 Jun 2019 12:45:44 +0000 (14:45 +0200)
commit1c3b83242da96f1d94ef3df34c399c1b984668b6
tree4d417b48f990c397e73ffa03bde1ed7ae936c72a
parent1bfd6020ce5f54120efd87906fd3675515ce4b8e
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.
src/chunk.c