* [Bug libstdc++/65704] Provide portable versions of std::timed_mutex and std::recursive_timed_mutex
2015-04-08 19:37 [Bug libstdc++/65704] New: Provide portable versions of std::timed_mutex and std::recursive_timed_mutex redi at gcc dot gnu.org
@ 2015-04-08 19:37 ` redi at gcc dot gnu.org
2015-04-09 10:17 ` redi at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2015-04-08 19:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65704
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-04-08
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
Target Milestone|--- |6.0
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libstdc++/65704] Provide portable versions of std::timed_mutex and std::recursive_timed_mutex
2015-04-08 19:37 [Bug libstdc++/65704] New: Provide portable versions of std::timed_mutex and std::recursive_timed_mutex redi at gcc dot gnu.org
2015-04-08 19:37 ` [Bug libstdc++/65704] " redi at gcc dot gnu.org
@ 2015-04-09 10:17 ` redi at gcc dot gnu.org
2015-04-28 17:38 ` redi at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2015-04-09 10:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65704
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Created attachment 35273
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35273&action=edit
something like this
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libstdc++/65704] Provide portable versions of std::timed_mutex and std::recursive_timed_mutex
2015-04-08 19:37 [Bug libstdc++/65704] New: Provide portable versions of std::timed_mutex and std::recursive_timed_mutex redi at gcc dot gnu.org
2015-04-08 19:37 ` [Bug libstdc++/65704] " redi at gcc dot gnu.org
2015-04-09 10:17 ` redi at gcc dot gnu.org
@ 2015-04-28 17:38 ` redi at gcc dot gnu.org
2015-09-04 11:24 ` redi at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2015-04-28 17:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65704
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Making this work requires splitting <mutex> into smaller pieces so that
std::timed_mutex can depend on std::condition_variable, which depends on
std::mutex.
I'll come back to it.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libstdc++/65704] Provide portable versions of std::timed_mutex and std::recursive_timed_mutex
2015-04-08 19:37 [Bug libstdc++/65704] New: Provide portable versions of std::timed_mutex and std::recursive_timed_mutex redi at gcc dot gnu.org
` (2 preceding siblings ...)
2015-04-28 17:38 ` redi at gcc dot gnu.org
@ 2015-09-04 11:24 ` redi at gcc dot gnu.org
2015-09-04 11:24 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2015-09-04 11:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65704
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Fri Sep 4 11:23:44 2015
New Revision: 227490
URL: https://gcc.gnu.org/viewcvs?rev=227490&root=gcc&view=rev
Log:
Add portable timed_mutex and recursive_timed_mutex.
PR libstdc++/65704
* include/Makefile.am: Add <bits/mutex.h>.
* include/Makefile.in: Regenerate.
* include/bits/mutex.h (__mutex_base, mutex, lock_guard, unique_lock):
New file containing types moved from <mutex>.
* include/std/condition_variable: Include <bits/mutex.h> instead of
<mutex>.
* include/std/mutex (__mutex_base, mutex, lock_guard, unique_lock):
Move to <bits/mutex.h>.
* testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Remove
dg-require-gthreads-timed.
* testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc:
Likewise.
* testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc:
Likewise.
* testsuite/30_threads/recursive_timed_mutex/dest/
destructor_locked.cc: Likewise.
* testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
* testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
* testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise.
* testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise.
* testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
Likewise.
* testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
Likewise.
* testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
Likewise.
* testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
Likewise.
* testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
Likewise.
* testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
* testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
* testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Likewise.
* testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Likewise.
* testsuite/30_threads/timed_mutex/dest/destructor_locked.cc:
Likewise.
* testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
* testsuite/30_threads/timed_mutex/requirements/standard_layout.cc:
Likewise.
* testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
* testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
* testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
* testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
* testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
* testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
* testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
* testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Likewise.
* testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
* testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
* testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
* testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
* testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
Added:
trunk/libstdc++-v3/include/bits/mutex.h
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/Makefile.am
trunk/libstdc++-v3/include/Makefile.in
trunk/libstdc++-v3/include/std/condition_variable
trunk/libstdc++-v3/include/std/mutex
trunk/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/1.cc
trunk/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc
trunk/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc
trunk/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc
trunk/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/1.cc
trunk/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/2.cc
trunk/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc
trunk/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc
trunk/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc
trunk/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc
trunk/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc
trunk/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc
trunk/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc
trunk/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/1.cc
trunk/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/1.cc
trunk/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/assign_neg.cc
trunk/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/copy_neg.cc
trunk/libstdc++-v3/testsuite/30_threads/timed_mutex/dest/destructor_locked.cc
trunk/libstdc++-v3/testsuite/30_threads/timed_mutex/lock/1.cc
trunk/libstdc++-v3/testsuite/30_threads/timed_mutex/requirements/standard_layout.cc
trunk/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/1.cc
trunk/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/2.cc
trunk/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/1.cc
trunk/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/2.cc
trunk/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/3.cc
trunk/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/1.cc
trunk/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/2.cc
trunk/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/57641.cc
trunk/libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/1.cc
trunk/libstdc++-v3/testsuite/30_threads/unique_lock/cons/5.cc
trunk/libstdc++-v3/testsuite/30_threads/unique_lock/cons/6.cc
trunk/libstdc++-v3/testsuite/30_threads/unique_lock/locking/3.cc
trunk/libstdc++-v3/testsuite/30_threads/unique_lock/locking/4.cc
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libstdc++/65704] Provide portable versions of std::timed_mutex and std::recursive_timed_mutex
2015-04-08 19:37 [Bug libstdc++/65704] New: Provide portable versions of std::timed_mutex and std::recursive_timed_mutex redi at gcc dot gnu.org
` (3 preceding siblings ...)
2015-09-04 11:24 ` redi at gcc dot gnu.org
@ 2015-09-04 11:24 ` redi at gcc dot gnu.org
2015-09-04 14:17 ` iains at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2015-09-04 11:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65704
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed on trunk
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libstdc++/65704] Provide portable versions of std::timed_mutex and std::recursive_timed_mutex
2015-04-08 19:37 [Bug libstdc++/65704] New: Provide portable versions of std::timed_mutex and std::recursive_timed_mutex redi at gcc dot gnu.org
` (4 preceding siblings ...)
2015-09-04 11:24 ` redi at gcc dot gnu.org
@ 2015-09-04 14:17 ` iains at gcc dot gnu.org
2015-09-04 14:24 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: iains at gcc dot gnu.org @ 2015-09-04 14:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65704
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |iains at gcc dot gnu.org
--- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> ---
Created attachment 36292
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36292&action=edit
fix for bootstrap fail
thanks for working on this Jonathan,
small glitch: as of 227490, bootstrap is broken with problems in
libstdc++-v3/include/std/mutex.
the patch attached allows bootstrap to complete - but I can't be sure it's what
you'd intended.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libstdc++/65704] Provide portable versions of std::timed_mutex and std::recursive_timed_mutex
2015-04-08 19:37 [Bug libstdc++/65704] New: Provide portable versions of std::timed_mutex and std::recursive_timed_mutex redi at gcc dot gnu.org
` (5 preceding siblings ...)
2015-09-04 14:17 ` iains at gcc dot gnu.org
@ 2015-09-04 14:24 ` redi at gcc dot gnu.org
2015-09-04 16:09 ` redi at gcc dot gnu.org
2015-09-04 16:15 ` redi at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2015-09-04 14:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65704
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Sorry, that was a stupid last minute copy & paste error. Fix coming...
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libstdc++/65704] Provide portable versions of std::timed_mutex and std::recursive_timed_mutex
2015-04-08 19:37 [Bug libstdc++/65704] New: Provide portable versions of std::timed_mutex and std::recursive_timed_mutex redi at gcc dot gnu.org
` (6 preceding siblings ...)
2015-09-04 14:24 ` redi at gcc dot gnu.org
@ 2015-09-04 16:09 ` redi at gcc dot gnu.org
2015-09-04 16:15 ` redi at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2015-09-04 16:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65704
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Fri Sep 4 16:09:05 2015
New Revision: 227495
URL: https://gcc.gnu.org/viewcvs?rev=227495&root=gcc&view=rev
Log:
fix darwin bootstrap errors due to <mutex>.
PR libstdc++/65704
* include/std/mutex (recursive_timed_mutex): Fix uses of _Can_lock.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/mutex
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libstdc++/65704] Provide portable versions of std::timed_mutex and std::recursive_timed_mutex
2015-04-08 19:37 [Bug libstdc++/65704] New: Provide portable versions of std::timed_mutex and std::recursive_timed_mutex redi at gcc dot gnu.org
` (7 preceding siblings ...)
2015-09-04 16:09 ` redi at gcc dot gnu.org
@ 2015-09-04 16:15 ` redi at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2015-09-04 16:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65704
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I wasn't actually testing the new code at all due to a cock up when trying to
undefine the macro that differs between darwin and other targets. Should be OK
now.
^ permalink raw reply [flat|nested] 10+ messages in thread