kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: tobias@gambas-buch.de (Tobias Boege)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Regarding module init function
Date: Fri, 4 Jan 2013 14:22:13 +0100	[thread overview]
Message-ID: <20130104132213.GB526@aurora> (raw)
In-Reply-To: <CA+NV+VkPvNW-ZJ=T5nvH=WhvXmsDFDsBpMwF5RNM3WyfCQSOog@mail.gmail.com>

On Fri, 04 Jan 2013, Rahul Bedarkar wrote:
> Hi,
> 
> This may be stupid question.
> 
> When we compile external module and insert it, it's init function is called
> and when we remove it, it's exit function gets called.
> 
> What happens in case of built-in modules? When it's init and exit is
> called? May be take example of one of auxdriver.
> 

You can find relevant information in LDD3, pp. 31 ff.. Basically, there is
no difference in the use of the init function (it's called at kernel
startup, I suppose) but exit is simply discarded in this case, because if
your module is built-in, it could never be removed.

Regards,
Tobi

  reply	other threads:[~2013-01-04 13:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-04 11:18 Regarding module init function Rahul Bedarkar
2013-01-04 13:22 ` Tobias Boege [this message]
2013-01-08  8:40   ` Rahul Bedarkar
2013-01-08 10:08     ` Rahul Bedarkar
2013-01-08 13:31       ` Dave Hylands
2013-01-08 13:50         ` Rahul Bedarkar
2013-01-08 14:33           ` Dave Hylands
2013-01-08 13:51       ` Tobias Boege
2013-01-08 16:44         ` anish kumar
2013-01-10  8:47           ` Tobias Boege
2013-01-12  5:49             ` Dave Hylands

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130104132213.GB526@aurora \
    --to=tobias@gambas-buch.de \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).