On 2011-12-13 15:19, Martin Nowak wrote:
On Tue, 13 Dec 2011 14:12:43 +0100, Jacob Carlborg <d...@me.com> wrote:
On Mac OS X there's a function available for that,
"_dyld_register_func_for_add_image". I don't know if there's something
similar available on Linux and FreeBSD.

http://developer.apple.com/library/mac/#documentation/developertools/Reference/MachOReference/Reference/reference.html



This can be done by __attribute__ ((constructor)) or by adding a function
pointer to the .init section.

If __attribute__ ((constructor)) is used you need a pre-compiled object file (written in C) which you can link all your D dynamic libraries with?

But the issue is initialization for already running threads.

When druntime is first initialized there won't be any D threads and the runtime doesn't need to care about non-D threads?

--
/Jacob Carlborg

Reply via email to