Re: Writing kernel API examples

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 4/18/07, Shakthi Kannan <shakthimaan@xxxxxxxxx> wrote:
Hi,

On 4/18/07, black hole <neyrith@xxxxxxxxx> wrote:
> I did not manage to google out anything interesting
> on this topic.

Something like this?
http://www.gelato.unsw.edu.au/~dsw/public-files/kernel-docs/kernel-api/index.html

Actually no.

> The documentation
> should also point to how the kernel implements the API

You could look for implementation here:
http://lxr.linux.no

Well, I was thinking about documenting the relevant undocumented
kernel souce code. An example: To be able to use kernel RPC, one
has to learn it first. The only way to programatically learn it is to study
the source code of the RPC implementation and also the NFS
implementation and try it out (to program an example myself).
Reading only a manual page of a particular function (if it has any
comment at all) is still not enough for me to be able to use it properly.
I also need to understand the context (like preconditions,
post conditions). Also, many kernel data structures have flags that
influence the behaviour of the API functions. Finally, I also sometimes
miss the documentation of the allowed function-call sequence diagrams.

And by pointing out how a kernel accomplishes some feature I meant
"look, this source line inside this function does the job!".

Maybe understanding the source code is a precondition to be met
prior to do any kernel programming :) I still disagree. Taken to an extreme,
by starting reading the source code one could ultimately recurse into
reading the manuals for a given architecture to understand, for example,
how the kernel module is copied into the kernel memory and has its
relocations done. (When all that was needed was to write a simple
kernel module). That's the point.

BlackHole

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux