public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "npl at chello dot at" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/56002] New: [mutex] allow generic classes to be used without requiring plattform support for threads
Date: Wed, 16 Jan 2013 12:21:00 -0000	[thread overview]
Message-ID: <bug-56002-4@http.gcc.gnu.org/bugzilla/> (raw)


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


             reply	other threads:[~2013-01-16 12:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16 12:21 npl at chello dot at [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-56002-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).