public inbox for linux-newbie@vger.kernel.org
 help / color / mirror / Atom feed
From: Kristof Provost <Kristof@provost-engineering.be>
To: Rajeh kuri <rajeshkuri@gmail.com>
Cc: linux-newbie@vger.kernel.org
Subject: Re: kernel module
Date: Tue, 13 Nov 2007 15:06:29 +0100	[thread overview]
Message-ID: <20071113140628.GC10096@berith> (raw)
In-Reply-To: <c26b6f110711130423s753b915wc2c001087a42d1fd@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 865 bytes --]

On 2007-11-13 17:53:11 (+0530), Rajeh kuri <rajeshkuri@gmail.com> wrote:
> Well it means there is no way to achieve compiled kernel calling
> compiled kernel module. OR The direction of communication from kernel
> to kernel module can not be possible?
It is possible and it's done quite often. You just need to handle things
slightly differently.

Take a filesystem for example. They can be built as a module, and still
be used by the kernel. In this case that's basically done by function
pointers.
When the fs module is loaded it registers itself to the kernel and
passes pointers to the basic operations to the kernel.

The kernel itself doesn't contain any calls to (for example)
fat_statfs. That's only used in the fat module. The kernel calls
the statfs function pointer in the super_operations struct the fat
module registered when it was loaded.


Kristof


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-11-13 14:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-12 13:59 kernel module Rajeh kuri
2007-11-13  9:40 ` Kristof Provost
2007-11-13 12:23   ` Rajeh kuri
2007-11-13 14:06     ` Kristof Provost [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-11-13 10:33 Rodrigo Rubira Branco (BSDaemon)

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=20071113140628.GC10096@berith \
    --to=kristof@provost-engineering.be \
    --cc=linux-newbie@vger.kernel.org \
    --cc=rajeshkuri@gmail.com \
    /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