<div class="gmail_quote">On Thu, May 31, 2012 at 9:57 PM, red plait <span dir="ltr"><<a href="mailto:redplait@gmail.com" target="_blank">redplait@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It seems that under xp (both 32 and 64 bit) elc.dll cannot be loaded<br>
with LoadLibrary: <a href="http://redplait.blogspot.com/2012/05/ecldll.html" target="_blank">http://redplait.blogspot.com/2012/05/ecldll.html</a><br>
I think __declspec(thread) for GC_thread_key must be rewritten to use<br>
explicit TLS allocation scheme to solve this problem<br></blockquote></div><br>From inspecting the code, it seems that this part of the garbage collector could be totally optional, for in win32_threads.c it is only used as<div>
<div># if defined(THREAD_LOCAL_ALLOC)</div><div> GC_push_all((ptr_t)(&GC_thread_key),</div><div> (ptr_t)(&GC_thread_key)+sizeof(&GC_thread_key));</div><div> /* Just in case we ever use our own TLS implementation. */</div>
<div># endif</div></div><div>Since ECL does not use thread_local_alloc, if the garbage collector also doesn't, then one could drop that part and be able to do what you expect. Otherwise, removing the declspec() would be just doomed to fail, for the collector would expect it to have a different value for each thread.</div>
<div><br></div><div>Juanjo</div><div><div><br></div>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com" target="_blank">http://juanjose.garciaripoll.googlepages.com</a><br>
</div>