gcc/libstdc++-v3
Jonathan Wakely 7d2a98a727 libstdc++: Encapsulate __gthread_cond_t as std::__condvar
This introduces a new internal utility, std::__condvar, which is a
simplified form of std::condition_variable. It has no dependency on
<chrono> or std::unique_lock, which allows it to be used in
<bits/atomic_wait.h>.

This avoids repeating the #ifdef __GTHREAD_COND_INIT preprocessor
conditions and associated logic for initializing a __gthread_cond_t
correctly. It also encapsulates most of the __gthread_cond_xxx functions
as member functions of __condvar.

libstdc++-v3/ChangeLog:

	* include/bits/atomic_timed_wait.h (__cond_wait_until_impl):
	Do not define when _GLIBCXX_HAVE_LINUX_FUTEX is defined. Use
	__condvar and mutex instead of __gthread_cond_t and
	unique_lock<mutex>.
	(__cond_wait_until): Likewise. Fix test for return value of
	__cond_wait_until_impl.
	(__timed_waiters::_M_do_wait_until): Use __condvar instead
	of __gthread_cond_t.
	* include/bits/atomic_wait.h: Remove <bits/unique_lock.h>
	include. Only include <bits/std_mutex.h> if not using futexes.
	(__platform_wait_max_value): Remove unused variable.
	(__waiters::lock_t): Use lock_guard instead of unique_lock.
	(__waiters::_M_cv): Use __condvar instead of __gthread_cond_t.
	(__waiters::_M_do_wait(__platform_wait_t)): Likewise.
	(__waiters::_M_notify()): Likewise. Use notify_one() if not
	asked to notify all.
	* include/bits/std_mutex.h (__condvar): New type.
	* include/std/condition_variable (condition_variable::_M_cond)
	(condition_variable::wait_until): Use __condvar instead of
	__gthread_cond_t.
	* src/c++11/condition_variable.cc (condition_variable): Define
	default constructor and destructor as defaulted.
	(condition_variable::wait, condition_variable::notify_one)
	(condition_variable::notify_all): Forward to corresponding
	member function of __condvar.
2020-11-25 18:24:13 +00:00
..
config libstdc++: Avoid calling undefined __gthread_self weak symbol [PR 95989] 2020-11-19 21:07:06 +00:00
doc libstdc++: Document istreambuf_iterator base class change [PR 92285] 2020-11-04 12:46:52 +00:00
include libstdc++: Encapsulate __gthread_cond_t as std::__condvar 2020-11-25 18:24:13 +00:00
libsupc++ libstdc++: Use 'inline' consistently in std::exception_ptr [PR 97729] 2020-11-09 14:28:38 +00:00
po
python
scripts libstdc++: Pass CXXFLAGS to check_performance script 2020-10-09 14:01:55 +01:00
src libstdc++: Encapsulate __gthread_cond_t as std::__condvar 2020-11-25 18:24:13 +00:00
testsuite libstdc++: Fix testsuite helper functions [PR 97936] 2020-11-25 18:24:12 +00:00
acinclude.m4 libstdc++: Add configure checks for semaphores 2020-11-23 18:12:39 +00:00
aclocal.m4
ChangeLog Daily bump. 2020-11-25 09:34:01 +00:00
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
ChangeLog-2018
ChangeLog-2019
config.h.in libstdc++: Add configure checks for semaphores 2020-11-23 18:12:39 +00:00
configure libstdc++: Add configure checks for semaphores 2020-11-23 18:12:39 +00:00
configure.ac
configure.host Scope libstdc++ configuration for vxworks to all versions 2020-10-22 16:40:57 +00:00
crossconfig.m4 Scope libstdc++ configuration for vxworks to all versions 2020-10-22 16:40:57 +00:00
fragment.am
linkage.m4
Makefile.am
Makefile.in
README

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
index.html in the 'doc/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.