replace atomics with locks in locale-setting code
authorRich Felker <dalias@aerifal.cx>
Wed, 27 May 2015 04:22:43 +0000 (00:22 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 27 May 2015 04:28:46 +0000 (00:28 -0400)
commit63c188ec42e76ff768e81f6b65b11c68fc43351e
treece1b61bcf75c87aadc671c0d593b6bd3169f7102
parentdc031ee0b1ba11baa00cd7f0769e461a5f396c71
replace atomics with locks in locale-setting code

this is part of a general program of removing direct use of atomics
where they are not necessary to meet correctness or performance needs,
but in this case it's also an optimization. only the global locale
needs synchronization; allocated locales referenced with locale_t
handles are immutable during their lifetimes, and using atomics to
initialize them increases their cost of setup.
src/locale/__setlocalecat.c
src/locale/setlocale.c