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.
Just a comment...
Regards,
Guilhem.
_______________________________________________ kaffe mailing list [EMAIL PROTECTED] http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
