3 ms·
> What has been your main difficulty in finding the right APIs? Lack of documentation? Poor or unclear documentation? Something else? Definitely poor (or more
by woodruffw 6y ago
> What has been your main difficulty in finding the right APIs? Lack of documentation? Poor or unclear documentation? Something else?
Definitely poor (or more often, old) documentation. In particular, this has popped up for me when trying to write modules that add entries to procfs or sysfs: these interfaces are documented and widely used, but much of the documentation is years old and the APIs (or their best practices) have changed subtly. My best reference has just been the subsystem source itself, as well as other kernel modules that I know work.
Another thing that pops up: the Linux kernel is so big and has so many architecture-specific subtrees that it can be difficult to find the "effective" definition for some function or macro. Woboq and Elixir help with this a bit, but it's very easy to go down a rabbit hole.