Messages in this thread | | | Subject | Re: madvise() first draft | Date | Thu, 26 Aug 1999 11:57:51 -0700 | From | Zack Weinberg <> |
| |
Matthew Wilcox wrote: > On Wed, Aug 25, 1999 at 09:28:55PM -0700, Zack Weinberg wrote: > > The way it currently works is: after your patch is added to the > > official kernel, glibc will add the defines to <bits/mman.h> and the > > syscall stub to the library. Note that madvise() is already a > > function in libc you can call - it happens to do nothing but return -1 > > with errno set to ENOSYS, but it's there... > > > > We've been round and round the duplicate info in kernel and libc > > headers problem many times, and this is the least bad solution > > anyone's come up with to date. > > It is? How about: > > linux/include/public/foo.h > contains all constants and similar which should be exported to userspace. > > linux/include/linux/foo.h > does #include <public/foo.h> and then contains kernel-specific > stuff.
I remember Linus didn't want to deal with maintaining an arrangement like this (or the equivalent version with #ifdef __KERNEL__ around internal definitions).
It's not always easy to decide what is internal and what isn't, too...
zw
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |