RE: [LIP] kernel programming

Omanakuttan Narasimhan <Omanakuttan.Narasimhan-//[email protected]>
Newsgroups gmane.user-groups.linux.india.programmers
Message-ID <9D262C5FCA25D411BB4900508BA54EAA08669213@exchange-b.saltaire.pace.co.uk>
	>1)What is the difference among, module_init, init_module, __init,
__init_data and their 
	Whenenver a module loads, the the initialization routine for that
module is called. So usual device driver writers will put their
initalization code in this function or call the module specific
initalization routine from this function. It is not a mandatory requirement,
you can very well do that in open() or any other function as well. but this
is generally followed.
	module_init (fn) registers the function for initialization.
	before 2.4.x mandatory function names for this purpose were
init_module and cleanup_module. You may use those names as well, but
deprecated.
	Use module_exit() for de-initialization.

	__init is the qualifier which makes the kernel redeem the pages used
by the function. Usually initialization routines are run only once. the text
pages used by these functions are wasted thoughout the existence of these
modules. with __init they are redeemed by the kernel and used for other
purposes. 
	(you see a message : freeing up kernel memory XX kB freed during
bootup?)

	I highly recommend Linux Device Drivers (by rubini and corbet).
	  
	>3)Proc is the image of the kernel which can be used to configure
kernel at runtime. 
	Please visit www.kernelnewbies.org

	if you are serious about linux kernel programming, please read these
books cover to cover 

	1. OS concepts (Silbershatz )
	2. Design of the unix operating system (Maurice J bach)
	3. Linux Device drivers (rubini and corbet)
	4. Understanding the linux kernel (bovet and cessati)

	<end>


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.