Copper Hill
unread,Apr 22, 2009, 10:07:09 PM4/22/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to worldhunter
Kernel modules are different here, too. In the hello world example,
you might have noticed that we used a function, printk() but didn't
include a standard I/O library. That's because modules are object
files whose symbols get resolved upon insmod'ing. The definition for
the symbols comes from the kernel itself; the only external functions
you can use are the ones provided by the kernel. If you're curious
about what symbols have been exported by your kernel, take a look at /
proc/kallsyms.
The 2nd man section is devoted to system calls (like kill() and read
(). The 3rd man section is devoted to library calls, which you would
probably be more familiar with (like cosh() and random()).
The major number tells you which driver is used to access the
hardware. Each driver is assigned a unique major number; all device
files with the same major number are controlled by the same driver.
The minor number is used by the driver to distinguish between the
various hardware it controls.