stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek" <Travis.Vi...@roguewave.com>
Subject RE: svn commit: r644364 - in /stdcxx/trunk: src/locale_global.cpp tests/localization/22.locale.statics.mt.cpp
Date Thu, 03 Apr 2008 17:39:22 GMT
 

Martin Sebor wrote:
>
>Travis Vitek wrote:
>>  
>> 
>> Right. It seems that for this to be mt-safe with respect to other
>> library code that calls setlocale(), we would need to lock the
>> same lock that is used by _RW::__rw_setlocale. If don't use the
>> same lock it would be possible for the std::locale::global() call
>> to change the locale while some other library code is reading
>> locale specific data under protection of an active
>> _RW::__rw_setlocale instance.
>
>Good point. That probably means extending the __rw_setlocale
>interface to release the lock without restoring the original
>locale name.
>
>

Is there a chance that such a change would not be forward binary
compatible? 

C:\Build\stdcxx\trunk\msvc-8.0\12d\lib>dumpbin /exports libstd12d.dll |
find "setlocale"
        123   7A 000114C0 ??0__rw_setlocale@__rw@@QAE@PBDHH@Z =
??0__rw_setlocale@__rw@@QAE@PBDHH@Z (public: __thiscall
__rw::__rw_setlocale::__rw_setlocale(char const *,int,int))
        245   F4 00011610 ??1__rw_setlocale@__rw@@QAE@XZ =
??1__rw_setlocale@__rw@@QAE@XZ (public: __thiscall
__rw::__rw_setlocale::~__rw_setlocale(void))
        523  20A 00002C20 ??_F__rw_setlocale@__rw@@QAEXXZ =
??_F__rw_setlocale@__rw@@QAEXXZ (public: void __thiscall
__rw::__rw_setlocale::`default constructor closure'(void))
       1693  69C 00002C10 ?name@__rw_setlocale@__rw@@QBEPBDXZ =
?name@__rw_setlocale@__rw@@QBEPBDXZ (public: char const * __thiscall
__rw::__rw_setlocale::name(void)const )

Travis

Mime
View raw message