On 01/09/2017 09:18 PM, Andrew Makhorin wrote:
> Please see attached a working tls implementation for dll. It is from
> some old version of glpk.
> 

This solution would require to call lib_get_ptr in every function where
you refer to env.

I think it is better to exclude TLS on pre-Vista Windows.

Windows XP is not supported by Microsoft since April 8th, 2014.

Best regards

Heinrich

> 
> 
> On Mon, 2017-01-09 at 20:32 +0100, Heinrich Schuchardt wrote:
>> Hello David,
>>
>> the thread local storage is not correctly implemented for usage with
>> Windows in a DLL. See
>>
>> https://msdn.microsoft.com/en-us/library/windows/desktop/ms686997
>>
>> I think we should do the following:
>>
>> Write a test case that demonstrates the usage of multithreading GLPK
>> using the pthread library.
>>
>> Add a pthread emulation for Windows so we can use the same test code
>> with Windows and with Posix. For a minimalistic implementation see
>> http://sqlstat.sourceforge.net/doxygen/html/sqlthread_8h_source.html
>>
>> Rewrite the allocation and freeing of the env variable according to the
>> Windows DLL requirements.
b>>
>> Best regards
>>
>> Heinrich Schuchardt
>>
> 


_______________________________________________
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to