[Bug libstdc++/36801] config/cpu/generic/atomicity_mutex/atomicity.h incorrectly relies on global constructor ordering
jifl-bugzilla at jifvik dot org
gcc-bugzilla@gcc.gnu.org
Tue Jul 15 01:20:00 GMT 2008
------- Comment #5 from jifl-bugzilla at jifvik dot org 2008-07-15 01:19 -------
Created an attachment (id=15909)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15909&action=view)
Patch against 4.3.1 using a once variable to ensure safe initialisation
Here's a patch, let me know what you think. As a bonus, I've added a fix for a
thinko in concurrence.h with initialising a condition variable.
2008-07-14 Jonathan Larmour <jifl@eCosCentric.com>
PR libstdc++/36801
* include/ext/concurrence.h: Separate out __mutex construction into
a separate public method.
Fix __gthread_cond_t initialisation function macro name.
* config/cpu/generic/atomicity_mutex/atomicity.h: In a threaded
environment, use a once variable to guarantee atomic_mutex is
initialised before use.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36801
More information about the Gcc-bugs
mailing list