]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Restore unconditional atomic load in COW std::string
authorJonathan Wakely <jwakely@redhat.com>
Wed, 1 Dec 2021 20:58:58 +0000 (20:58 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 2 Dec 2021 16:46:28 +0000 (16:46 +0000)
commitb5a568683f71b4a8b1e4e45a43484398e9a66ff2
tree3fcc70af8566481446db259a09d3c451d49b704e
parentd08236359eb22918ba067489edcec02857109d09
libstdc++: Restore unconditional atomic load in COW std::string

The relaxed load is already optimal, checking the __single_threaded
global before doing a non-atomic load isn't an optimization.

libstdc++-v3/ChangeLog:

* include/bits/cow_string.h (basic_string::_M_is_leaked()):
Revert change to check __is_single_threaded() before using
atomic load.
libstdc++-v3/include/bits/cow_string.h