[PATCH][BZ #19329] Fix race between tls allocation at thread creation and dlopen
Torvald Riegel
triegel@redhat.com
Thu Jan 21 21:03:00 GMT 2016
On Mon, 2016-01-18 at 20:09 +0000, Szabolcs Nagy wrote:
> of course using both atomics and locks is a bit
> ugly..
Not necessarily. If it works and makes sense otherwise, I would not
advice against it. Some problems are easier to solve with locks, some
not. Mixing them isn't usually a big problem, if one follows some
rules. For example, if you access something with atomics, access it
with atomics everywhere, including in the critical sections.
More information about the Libc-alpha
mailing list