TLS for Android (and iOS)
Jacob Carlborg
doob at me.com
Sun Mar 30 23:25:06 PDT 2014
On 30/03/14 17:34, Dan Olson wrote:
> Do think we can just drop the dyld code into druntime?
Yes, with minor modifications. The TLS related code in dyld is pretty
much self contained. I don't see dyld using any functionality that isn't
available to a regular application.
> It should work with perhaps some modifications, but I am not familiar with the Apple
> opensource license. I should read it. It is BSD-like right?
The license is a completely different issue. The safest would be to
re-implement the code. One can document the existing code and some other
can do the implementation.
Regardless of the license, you can still give a try to see if the
technical parts work.
> Would still need to hook in the garbage collector so it scans the thread local
> memory. I'll have to try it tonight.
You'll just need to add a call to druntime in one of the functions in
the dyld TLS code. Have a look at:
https://github.com/D-Programming-Language/druntime/blob/master/src/rt/sections_osx.d
--
/Jacob Carlborg
More information about the digitalmars-d-ldc
mailing list