This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/16248] [3.5 Regression] recent concurrence.h chanes breaks mingw bootstrap
- From: "per at bothner dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jun 2004 18:46:42 -0000
- Subject: [Bug libstdc++/16248] [3.5 Regression] recent concurrence.h chanes breaks mingw bootstrap
- References: <20040628163801.16248.bothner@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From per at bothner dot com 2004-06-29 18:46 -------
Subject: Re: [3.5 Regression] recent concurrence.h chanes
breaks mingw bootstrap
membar at gcc dot gnu dot org wrote:
> If you look at the comments for the class in question (and also all occurrences
> of the code that use this class), you see that the mutex is assumed to already
> be initialized - it's sufficient to lock the mutex without doing any
> initialization on it. That's why I created and used a new macro called
> __glibcxx_mutex_lock_noinit for this purpose.
The mutex is *assumed* to be initialized, but it isn't until
__GTHREAD_MUTEX_INIT_FUNCTION is called. And your patch fails
to do that. The macro __glibcxx_mutex_define_initialized
defines a function NAME##once that calls __GTHREAD_MUTEX_INIT_FUNCTION
but no-body ever calls NAME##once.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16248