[PATCH libX11 1/3] Make _XCloseLC thread safe.
Jacek Caban
jacek at codeweavers.com
Mon Aug 14 17:27:27 UTC 2017
Hi,
Sure, a simple test case is attached. It replicates what Wine does when
initializing new threads (see [1] for Wine reports).
Thanks,
Jacek
[1] https://bugs.winehq.org/show_bug.cgi?id=35041
On 14.08.2017 15:43, walter harms wrote:
> hi,
> can you provide a simple program does needs the patch to work ?
>
> re,
> wh
>
> Am 10.08.2017 23:04, schrieb Jacek Caban:
>> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=55678
>> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=68538
>> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69088
>> Signed-off-by: Jacek Caban <jacek at codeweavers.com>
>> ---
>> src/xlibi18n/lcWrap.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/src/xlibi18n/lcWrap.c b/src/xlibi18n/lcWrap.c
>> index 38242608..43b4d622 100644
>> --- a/src/xlibi18n/lcWrap.c
>> +++ b/src/xlibi18n/lcWrap.c
>> @@ -324,6 +324,8 @@ _XCloseLC(
>> {
>> XLCdList cur, *prev;
>> + _XLockMutex(_Xi18n_lock);
>> +
>> for (prev = &lcd_list; (cur = *prev); prev = &cur->next) {
>> if (cur->lcd == lcd) {
>> if (--cur->ref_count < 1) {
>> @@ -339,6 +341,8 @@ _XCloseLC(
>> _XlcDeInitLoader();
>> loader_list = NULL;
>> }
>> +
>> + _XUnlockMutex(_Xi18n_lock);
>> }
>> /*
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xtest.c
Type: text/x-csrc
Size: 549 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20170814/18e136e5/attachment.c>
More information about the xorg-devel
mailing list