Re: Simple header cleanups

From: Krzysztof Halasa
Date: Thu Apr 27 2006 - 04:49:34 EST


Denis Vlasenko <vda@xxxxxxxxxxxxx> writes:

> Maybe we should have a script which processes kernel's include/linux/*
> files and produces sanitized set of headers (by deleting
> "#ifdef __KERNEL__" blocks, etc), which will be treated at
> *the* official kernel<->userspace API and will be used by glibc etc?

It would really be better to create "ABI/API" header set in the
kernel at last. Glibc people, Linux-only kernel utils and of course
the rest of the kernel could just #include the API files (a copy
probably).

We _do_ have a stable userspace ABI and API, and contrary to the popular
belief the header set would be quite small (probably an order of magnitude
smaller than the "sanitized headers" package). What we need to export is
the actual API (including things like ioctl, netlink, SG_IO etc), most
things should be kept private to the kernel (and never copied anywhere
etc).

I realize this is completely uninteresting job. Perhaps someone wants
to pay a bit for having done it?

Why do we need, for example, /usr/include/linux/sc26198.h (FC5's
glibc-kernheaders-3.0-5.2)?

* sc26198.h -- SC26198 UART hardware info.
...
/*
* Global register definitions. These registers are global to each 26198
* device, not specific ports on it.
*/
#define TSTR 0x0d
#define GCCR 0x0f
#define ICR 0x1b
--
Krzysztof Halasa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/