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

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).