[kaffe] runtime selectable threading model
Dalibor Topic
robilad at kaffe.org
Mon Dec 13 11:19:08 PST 2004
Guilhem Lavaux wrote:
> Adam Heath wrote:
>
>> I've just done the first test of being able to select the threading model
>> kaffe will use at runtime.
>>
>> Attached you will find the my test framework. It makes use of gcc
>> __attribute__((constructor)) to do it's magic. It can work with
>> threading
>> models compiled statically, or dynamically, transparently.
>>
>> All that is required now, is to modify all thread function calls in
>> kaffe to
>> use a global dispatch table, a setup function to load the appropriate
>> table,
>> automake lines to make modules or compile statically, as needed, and then
>> it'll work. Shouldn't be too hard to do all that.
>>
>>
>
> Hi Adam,
>
> Your code looks interesting. Though I guess we will have some problems
> to generalize the process to include boehm-gc altered thread call. If
> you look carefully to thread-impl.c you will see I've added an ifdef
> (*sigh*) to include a specific boehm includes when we want to use this
> GC (which we cannot now but will happen in a near future). The easiest
> solution is to leave the code as it is and simply disable the multi
> thread model generation if we want the boehm GC.
I'd also like to point out that libtool apparently supports modules,
which sounds pretty much like what we'd like to have, as far as I can
say. See http://www.gnu.org/software/libtool/manual.html#SEC47 for details.
One further thing to consider is that one would want this to work with
static builds, and cross-compilation.
cheers,
dalibor topic
More information about the kaffe
mailing list