incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@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:47:23 GMT
Travis Vitek wrote:
>  
> 
> 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? 

__rw_setlocale is an implementation class that's not exposed
in our headers so there shouldn't be any changes to it that
we could make that would be binary incompatible.

Martin

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