Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 23, 2013
An "enum" for Python 3
An unexpected perf feature
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
The UAPI files seem to include the kernel headers.
For example: the include/uapi/linux/eventpoll.h file includes <linux/fcntl.h>.
The include stack would then look like this for a kernel compile:
This seems unnecessary and would make it possible to depend on declarations that are implicitly defined through the kernel versions of the header.
Unless I'm mistaken. Which is a very likely possibility.
The UAPI header file split
Posted Jul 26, 2012 15:19 UTC (Thu) by dhowells (subscriber, #55933)
Yes. That is so - *if* you're using them for a kernel build. If you're using them for a userspace build, they only see each other.
It actually mirrors the way things work now. Just think of the way such kernel header files are usually constructed: a bunch of #includes that get put into the userspace header, then some userspace defs, then the __KERNEL__ guard, then the kernel space stuff.
With what I've constructed, it ends up being pretty much the same - except that the UAPI part of it is in a separate file.
> This seems unnecessary
Unfortunately, if I use uapi/ in the UAPI header files' #includes they will need processing to remove it on installation. The alternative would require the KAPI headers have different names in some way (either named something different or with different directory components) - they would have to be distinguished by cpp, right?
> and would make it possible to depend on declarations that are implicitly
> defined through the kernel versions of the header.
I'm not sure what you're getting at. #including a kernel header after the split must give you at least what you got from it before the split, even if some of those bits are obtained indirectly. I don't think there are any cases where you get anything more than you got before the split.
Posted Jul 26, 2012 20:03 UTC (Thu) by krisis (subscriber, #70792)
After thinking about it, I've realized that it would be a massive undertaking, added to the already massive undertaking that this patch series is.
Posted Jul 26, 2012 20:30 UTC (Thu) by dhowells (subscriber, #55933)
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds