[kaffe] moving sysdepCallMethod out of config/cpu/common.h

Dalibor Topic robilad at kaffe.org
Thu Dec 11 06:50:03 PST 2003


Hi all,

while I'm busy turning sysdepCallMethod macros [1] into tstaic inline 
functions, I encountered some cases, where the cpu specific 
sysdepCallMethod had to be overwritten by a cpu-os specific one 
(arm-riscos, m68k-linux, etc.). This is currently done either through 
carefully crafted #ifdef cascades, or some #undef trickery.

The #undef trickery will become impossible when sysdepCallMethod ceases 
to be a macro on all platforms, and I don't like #ifdef cascades, as I 
think the problem could be solved through a better code layout.

So I'll be moving sysdepCallMethod out out common.h into its own file, 
cpu/sysdepCallMethod.h, which is to be included by md.h on each platform 
if it uses the common sysdepCallMethod, otherwise md.h should define its 
own sysdepCallMethod.

This way, we can eliminate the need for #ifdef cascades, as well as the 
need for #undef trickery in this particular case.

If you disagree, now it's the time to speak up, before I go and break 
everything ;)

[1] Yuck!





More information about the kaffe mailing list