This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/12658] Thread safety problems in locale::global() and locale::locale()
- From: "bkoz at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Dec 2003 18:38:33 -0000
- Subject: [Bug libstdc++/12658] Thread safety problems in locale::global() and locale::locale()
- References: <20031017095219.12658.peturr02@ru.is>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bkoz at redhat dot com 2003-12-13 18:38 -------
Subject: Re: Thread safety problems in
locale::global() and locale::locale()
>It seems odd to wrap atomic updates with a mutex but it looks OK...
Yeah, for locale::locale()? For locale::global it looks less strange, I
think. Sadly, I think it is necessary for locale::locale(), as
assignment + atomic update is not, in combination, atomic... I suppose I
could split that into two lines to clarify.
>I must commend the improvement of adding bits/concurrence.h instead of
>continuing the ad hoc style which is scattered about. - Loren
Well.........
\o.o/
You know my feelings about stl_thread.h.... I was just testing the water
here, to see your reaction. If this is ok then I think I'm going to go
through and consolidate, and try to get rid of the _GTHREADS bits that
have been multiplying in the codebase. Thus, the placement of
bits/concurrence.h as a public header.
That would mean adding similar bits for _gthread_once, usage of which
has multiplied as of late, but it seems very doable. That's a later
patch, however...
Thanks,
benjamin
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12658