[I'd ask this on linux-kernel, but I just can't take the
traffic...]
In the linux kernel tree, there is an include directory.
Below this is include/linux and include/asm-XXX - one for
each architecture. During the build, include/asm is linked
to the relevant include/asm-XXX directory.
Some files in include/linux (for example errno.h) include
files from asm/, presumably to pick up arch-dependent values.
That's all well and good.
My next hypothesis was that the stuff in asm-XXX should also
be suitable for use in assembly language files.
But... some of the files in asm-XXX use C constructs, such as
structure definitions.
So, should include/asm-XXX really be called include/arch-XXX ?
And what's the deal with making .h files for us by .S assembly
language files? My suspicion is that I need to make #define-only
.h files with no struct declarations, and big a dirty big warning
at the top about keeping C-isms out of the file.
Is this really the way, or am I missing something fundamental?
Later,
Kenn
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!