diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-11-03 19:42:07 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-11-03 20:03:16 +0000 |
commit | 9f925f3b198e210e0d124a3c69fae034f429942f (patch) | |
tree | 8663060c9f3a8a645958c05d730dcaa2702c089b /gcc/omp-low.c | |
parent | ed7f9957bbb5e899099e1ef0e5f6234c453ef7da (diff) | |
download | gcc-9f925f3b198e210e0d124a3c69fae034f429942f.zip gcc-9f925f3b198e210e0d124a3c69fae034f429942f.tar.gz gcc-9f925f3b198e210e0d124a3c69fae034f429942f.tar.bz2 |
libstdc++: Refactor std::call_once internals
This separates the definition of std::__call_proxy into two funcions,
one for TLS and one for non-TLS, to make them easier to read. It also
replaces the __get_once_functor_lock_ptr() internal helper with a new
set_lock_ptr(unique_lock<mutex>*) function so that __once_proxy doesn't
need to call it twice.
libstdc++-v3/ChangeLog:
* src/c++11/mutex.cc [_GLIBCXX_HAVE_TLS] (__once_proxy): Define
separately for TLS targets.
[!_GLIBCXX_HAVE_TLS] (__get_once_functor_lock_ptr): Replace with ...
(set_lock_ptr): ... this. Set new value and return previous
value.
[!_GLIBCXX_HAVE_TLS] (__set_once_functor_lock_ptr): Adjust to
use set_lock_ptr.
[!_GLIBCXX_HAVE_TLS] (__once_proxy): Likewise.
Diffstat (limited to 'gcc/omp-low.c')
0 files changed, 0 insertions, 0 deletions