5 ms·
Glibc and the kernel user-space API
- g3orge 14y agoI always wanted to say that lwn's effort to write good articles (like this one) is shadowed by their weak website. There isn't for example an index of similar articles like this one or introductions to various kernel modules/structures. Maybe everyone but me can find them.
- corbet 14y agoLWN kernel index at https://lwn.net/Kernel/Index/ https://lwn.net/Kernel/Index/ Yes, the LWN site needs a lot of work. It's just hard to take the time to do that at the expense of the content itself, but some things are in the works...slowly...
- g3orge 14y agook, thanks for the answer. btw, which kernel development book are you currently suggesting??
- corbet 14y agoLinux Device Drivers, of course! Love's "Linux Kernel Development" is less obsolete currently, but I do still think that LDD has a lot of useful information not found elsewhere. Available in all the usual places or downloadable from http://lwn.net/Kernel/LDD3/ http://lwn.net/Kernel/LDD3/
- planckscnst 14y agoI like the idea of a header file with macros distributed with the kernel for providing basic syscall functions. Is there any reason that couldn't work?
- JoachimSchipper 14y agoType-safety is hard with macros; you can't use a macro as a function pointer, for the obvious reason that it's not a function; such macros would tend to trample all over libc functionality, and glibc is not the only libc; the kernel and userland should arguably be separate. It wouldn't be too hard to create (generate) a "libwrapsyscall" that just provided syscalls; if this is worth doing, it's worth doing properly.
- binarycrusader 14y agoI would think that the new generic selection macro capability in C11 would help here: http://www.robertgamble.net/2012/01/c11-generic-selections.html I haven't taken the time to prototype an implementation, but it seems like at least some cases could be solved.
- throwaway54-762 14y agoHow about 'static inline' functions distributed along with the libc header files? You get type / number of arguments correctness and no ABI bloat, at the cost of having (minimal) code in header files and per-object code duplication (possibly solved by an intelligent cc/ld).
- revelation 14y agoClassic drepper. Theres a syscall here that maybe the layer between OS and program should expose - Never
- DrJokepu 14y agoDidn't Ulrich Drepper retire from glibc development quite a while ago?
- revelation 14y agoYes, but I wasn't so much conjuring up his response, I'm quoting him directly from the linked bug report :)