public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/56002] New: [mutex] allow generic classes to be used without requiring plattform support for threads
@ 2013-01-16 12:21 npl at chello dot at
2013-01-16 12:25 ` [Bug libstdc++/56002] " redi at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: npl at chello dot at @ 2013-01-16 12:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56002
Bug #: 56002
Summary: [mutex] allow generic classes to be used without
requiring plattform support for threads
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: libstdc++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: npl@chello.at
Created attachment 29179
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29179
patch for mutex. diffed against 4.7.2
I am using gcc & libstdc++ on a plattform that isnt natively supported and thus
thread-functionality is not available from libstdc++.
However I would like to be able to still use std::lock_guard, std::unique_lock,
std::lock with my own mutex-classes. There ist no technical reason to prevent
use of those generic classes and functions which are deliberately designed to
work with custom implementations.
---mutex like it is now (all-or-nothing):
#if HAS_GCC_THREADS
<mutexes definiton>
<generic stuff like defer_lock_t,lock_guard, unique_lock, lock>
<once_flag>
#endif
----------------------------------------
---mutex like it should be:
#if HAS_GCC_THREADS
<mutexes definiton>
#endif
<generic stuff like defer_lock_t,lock_guard, unique_lock, lock>
#if HAS_GCC_THREADS
<once_flag>
#endif
----------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/56002] [mutex] allow generic classes to be used without requiring plattform support for threads
2013-01-16 12:21 [Bug libstdc++/56002] New: [mutex] allow generic classes to be used without requiring plattform support for threads npl at chello dot at
@ 2013-01-16 12:25 ` redi at gcc dot gnu.org
2013-01-17 15:07 ` [Bug libstdc++/56002] [C++11] allow generic locks " daniel.kruegler at googlemail dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2013-01-16 12:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56002
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-01-16
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/56002] [C++11] allow generic locks to be used without requiring plattform support for threads
2013-01-16 12:21 [Bug libstdc++/56002] New: [mutex] allow generic classes to be used without requiring plattform support for threads npl at chello dot at
2013-01-16 12:25 ` [Bug libstdc++/56002] " redi at gcc dot gnu.org
@ 2013-01-17 15:07 ` daniel.kruegler at googlemail dot com
2013-01-17 16:19 ` redi at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2013-01-17 15:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56002
Daniel Krügler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler at
| |googlemail dot com
--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2013-01-17 15:06:50 UTC ---
I agree. Today I needed to duplicate std::lock_guard because of this problem
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/56002] [C++11] allow generic locks to be used without requiring plattform support for threads
2013-01-16 12:21 [Bug libstdc++/56002] New: [mutex] allow generic classes to be used without requiring plattform support for threads npl at chello dot at
2013-01-16 12:25 ` [Bug libstdc++/56002] " redi at gcc dot gnu.org
2013-01-17 15:07 ` [Bug libstdc++/56002] [C++11] allow generic locks " daniel.kruegler at googlemail dot com
@ 2013-01-17 16:19 ` redi at gcc dot gnu.org
2013-01-17 20:44 ` npl at chello dot at
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2013-01-17 16:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56002
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-01-17 16:19:19 UTC ---
Yep, I'm fixing it.
I went to add a test for locks that wouldn't rely on thread support and found
I'd already added one ages ago:
http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/30_threads/lock_guard/cons/1.cc?revision=185390&content-type=text%2Fplain&view=co
That just needs the dejagnu target selectors removed so it always runs.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/56002] [C++11] allow generic locks to be used without requiring plattform support for threads
2013-01-16 12:21 [Bug libstdc++/56002] New: [mutex] allow generic classes to be used without requiring plattform support for threads npl at chello dot at
` (2 preceding siblings ...)
2013-01-17 16:19 ` redi at gcc dot gnu.org
@ 2013-01-17 20:44 ` npl at chello dot at
2013-03-16 19:46 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: npl at chello dot at @ 2013-01-17 20:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56002
--- Comment #3 from npl at chello dot at 2013-01-17 20:43:35 UTC ---
great, response looks already more promising than my other gcc
patches/requests.
Any chance this will find its way into 4.7.3?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/56002] [C++11] allow generic locks to be used without requiring plattform support for threads
2013-01-16 12:21 [Bug libstdc++/56002] New: [mutex] allow generic classes to be used without requiring plattform support for threads npl at chello dot at
` (3 preceding siblings ...)
2013-01-17 20:44 ` npl at chello dot at
@ 2013-03-16 19:46 ` redi at gcc dot gnu.org
2013-03-16 19:53 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2013-03-16 19:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56002
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-03-16 19:46:07 UTC ---
Author: redi
Date: Sat Mar 16 19:45:53 2013
New Revision: 196706
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196706
Log:
PR libstdc++/56002
* include/std/mutex (lock_guard, unique_lock, lock): Define without
depending on _GLIBCXX_HAS_GTHREADS.
* testsuite/30_threads/lock_guard/cons/1.cc: Run on all targets.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/mutex
trunk/libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/56002] [C++11] allow generic locks to be used without requiring plattform support for threads
2013-01-16 12:21 [Bug libstdc++/56002] New: [mutex] allow generic classes to be used without requiring plattform support for threads npl at chello dot at
` (4 preceding siblings ...)
2013-03-16 19:46 ` redi at gcc dot gnu.org
@ 2013-03-16 19:53 ` redi at gcc dot gnu.org
2013-03-16 20:23 ` redi at gcc dot gnu.org
2013-03-24 17:52 ` redi at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2013-03-16 19:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56002
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |redi at gcc dot gnu.org
|gnu.org |
Target Milestone|--- |4.7.3
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-03-16 19:52:42 UTC ---
Fixed on trunk so far, the fix will also be done for 4.7.3 and 4.8.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/56002] [C++11] allow generic locks to be used without requiring plattform support for threads
2013-01-16 12:21 [Bug libstdc++/56002] New: [mutex] allow generic classes to be used without requiring plattform support for threads npl at chello dot at
` (5 preceding siblings ...)
2013-03-16 19:53 ` redi at gcc dot gnu.org
@ 2013-03-16 20:23 ` redi at gcc dot gnu.org
2013-03-24 17:52 ` redi at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2013-03-16 20:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56002
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-03-16 20:22:40 UTC ---
Author: redi
Date: Sat Mar 16 20:22:30 2013
New Revision: 196710
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196710
Log:
PR libstdc++/56002
* include/std/mutex (lock_guard, unique_lock, lock): Define without
depending on _GLIBCXX_HAS_GTHREADS.
* testsuite/30_threads/lock_guard/cons/1.cc: Run on all targets.
Modified:
branches/gcc-4_7-branch/libstdc++-v3/ChangeLog
branches/gcc-4_7-branch/libstdc++-v3/include/std/mutex
branches/gcc-4_7-branch/libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/56002] [C++11] allow generic locks to be used without requiring plattform support for threads
2013-01-16 12:21 [Bug libstdc++/56002] New: [mutex] allow generic classes to be used without requiring plattform support for threads npl at chello dot at
` (6 preceding siblings ...)
2013-03-16 20:23 ` redi at gcc dot gnu.org
@ 2013-03-24 17:52 ` redi at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2013-03-24 17:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56002
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-03-24 17:51:52 UTC ---
Fixed for 4.8.1 by this patch:
Author: redi
Date: Sun Mar 24 17:50:44 2013
New Revision: 197020
URL: http://gcc.gnu.org/viewcvs?rev=197020&root=gcc&view=rev
Log:
PR libstdc++/56002
* include/std/mutex (lock_guard, unique_lock, lock): Define without
depending on _GLIBCXX_HAS_GTHREADS.
* testsuite/30_threads/lock_guard/cons/1.cc: Run on all targets.
Modified:
branches/gcc-4_8-branch/libstdc++-v3/ChangeLog
branches/gcc-4_8-branch/libstdc++-v3/include/std/mutex
branches/gcc-4_8-branch/libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-03-24 17:52 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-16 12:21 [Bug libstdc++/56002] New: [mutex] allow generic classes to be used without requiring plattform support for threads npl at chello dot at
2013-01-16 12:25 ` [Bug libstdc++/56002] " redi at gcc dot gnu.org
2013-01-17 15:07 ` [Bug libstdc++/56002] [C++11] allow generic locks " daniel.kruegler at googlemail dot com
2013-01-17 16:19 ` redi at gcc dot gnu.org
2013-01-17 20:44 ` npl at chello dot at
2013-03-16 19:46 ` redi at gcc dot gnu.org
2013-03-16 19:53 ` redi at gcc dot gnu.org
2013-03-16 20:23 ` redi at gcc dot gnu.org
2013-03-24 17:52 ` redi at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).