diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2018-08-14 14:13:37 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2018-08-14 14:13:37 +0100 |
commit | 26e130482e69aef0dbd0bc4c218a82ba7b64bce7 (patch) | |
tree | de42754637ea28cd22651f0f584d9ed38e54caa3 /gcc/fortran/interface.c | |
parent | 484e936e88e52d9e4e013bbc1b8264f556ff7cb4 (diff) | |
download | gcc-26e130482e69aef0dbd0bc4c218a82ba7b64bce7.zip gcc-26e130482e69aef0dbd0bc4c218a82ba7b64bce7.tar.gz gcc-26e130482e69aef0dbd0bc4c218a82ba7b64bce7.tar.bz2 |
PR libstdc++/86846 Alternative to pointer-width atomics
Define a class using std::mutex for when std::atomic<memory_resource*>
cannot be used to implement the default memory resource.
When std::mutex constructor is not constexpr the constant_init trick
won't work, so just define a global and use init_priority for it. The
compiler warns about using reserved priority, so put the definition in a
header file using #pragma GCC system_header to suppress the warning.
PR libstdc++/86846
* src/c++17/default_resource.h: New file, defining default_res.
* src/c++17/memory_resource.cc [ATOMIC_POINTER_LOCK_FREE != 2]
(atomic_mem_res): Define alternative for atomic<memory_resource*>
using a mutex instead of atomics.
From-SVN: r263536
Diffstat (limited to 'gcc/fortran/interface.c')
0 files changed, 0 insertions, 0 deletions