aboutsummaryrefslogtreecommitdiff
path: root/libiberty/sigsetmask.c
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2018-10-03 12:27:40 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2018-10-03 12:27:40 +0100
commit749c0e1d8b2c8dbc54af3365af506b3e1986e754 (patch)
tree08e082060cf8f5dbfadf13f7fa2bf8ab8121357f /libiberty/sigsetmask.c
parente7df9e44c68164cfdd0dcc8d848d480054c4e6b3 (diff)
downloadgcc-749c0e1d8b2c8dbc54af3365af506b3e1986e754.zip
gcc-749c0e1d8b2c8dbc54af3365af506b3e1986e754.tar.gz
gcc-749c0e1d8b2c8dbc54af3365af506b3e1986e754.tar.bz2
PR libstdc++/59439 optimize uses of classic ("C") std::locale
The global locale::_Impl that represents the "C" locale is never destroyed, so there is no need to keep track of reference count updates for that object. This greatly reduce contention between threads that refer to the classic locale. Since the global std::locale initially uses the classic locale, this benefits the common case for any code using the global locale, such as construction/destruction of iostream objects. All these updates are done inside libstdc++.so so there's no need to worry about users' objects having inlined old versions of the code which still update the reference count for the classic locale. PR libstdc++/59439 * src/c++98/locale.cc (locale::locale(const locale&)): Bypass reference count updates for the classic locale. (locale::~locale()): Likewise. (locale::operator=(const locale&)): Likewise. * src/c++98/locale_init.cc (locale::locale()): Likewise. (locale::global(const locale&)): Likewise. From-SVN: r264811
Diffstat (limited to 'libiberty/sigsetmask.c')
0 files changed, 0 insertions, 0 deletions