This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/12658] Thread safety problems in locale::global() and locale::locale()


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]