This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix shared_timed_mutex::try_lock_until() et al


On 08/04/15 20:11 +0100, Jonathan Wakely wrote:
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 5871716..39d6866 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -2,7 +2,8 @@

	* include/std/shared_mutex (shared_timed_mutex): Add comments to
	explain the logic.
-	(_M_n_readers): Rename to _S_n_readers.
+	(_Mutex): Remove redundant type.
+	(_M_n_readers): Rename to _S_max_readers.
	(_M_write_entered, _M_readers): New convenience functions.
	(lock, lock_shared, try_lock_shared, unlock_shared): Use convenience
	functions. Use predicates with condition variables. Simplify bitwise
@@ -11,7 +12,8 @@
	and call try_lock_until or try_shared_lock_until respectively.
	(try_lock_until, try_shared_lock_until): Wait on the condition
	variables until the specified time passes.
-	(unlock, unlock_shared): Add Debug Mode assertions.
+	(unlock): Add Debug Mode assertion.
+	(unlock_shared): Add Debug Mode assertion.
	* testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: New.

This has been committed to trunk and 4.9 (because on the 4.9 branch we
only had the non-pthread_rwlock_t version with broken timed lock
functions).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]