https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97985
Bug ID: 97985
Summary: Simplify <ext/concurrence.h>
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
Most of the <ext/concurrence.h> header is only used in libsupc++/guard.cc and
so doesn't need to be in a public header.
The __gnu_cxx::__mutex type is used in a few places, but they could probably
use std::mutex instead.
The __gnu_cxx::__recursive_mutex and __gnu_cxx::__cond types are not needed
outside of libsupc++/guard.cc so should be removed from the public header.
The exception types __concurrence_broadcast_error and __concurrence_wait_error
are only needed by __cond.
Having four exception types in that header increases the size of the library,
due to the vtables and RTTI. We would probably just have one type that holds a
const char* for the result of what().
Some of these things are mentioned in the docs, so we might want to deprecate
them first, before removing them.