From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13588 invoked by alias); 16 Jan 2013 12:21:37 -0000 Received: (qmail 13531 invoked by uid 48); 16 Jan 2013 12:21:20 -0000 From: "npl at chello dot at" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: npl at chello dot at X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg01502.txt.bz2 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 #endif ---------------------------------------- ---mutex like it should be: #if HAS_GCC_THREADS #endif #if HAS_GCC_THREADS #endif ----------------------------------------