On Thu, May 31, 2012 at 9:57 PM, red plait <redpl...@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
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to