[Ecls-list] ecl.dll dynamic loading

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Thu May 31 20:55:32 UTC 2012


On Thu, May 31, 2012 at 9:57 PM, red plait <redplait at gmail.com> wrote:

> It seems that under xp (both 32 and 64 bit) elc.dll cannot be loaded
> with LoadLibrary: http://redplait.blogspot.com/2012/05/ecldll.html
> I think __declspec(thread) for GC_thread_key must be rewritten to use
> explicit TLS allocation scheme to solve this problem
>

>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
# if defined(THREAD_LOCAL_ALLOC)
    GC_push_all((ptr_t)(&GC_thread_key),
      (ptr_t)(&GC_thread_key)+sizeof(&GC_thread_key));
    /* Just in case we ever use our own TLS implementation.     */
# endif
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.

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20120531/6f8d4526/attachment.html>


More information about the ecl-devel mailing list