kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: horserivers@gmail.com (horseriver)
To: kernelnewbies@lists.kernelnewbies.org
Subject: what does this do ?
Date: Mon, 14 Jan 2013 13:56:21 +0800	[thread overview]
Message-ID: <20130114055621.GA4289@debian.localdomain> (raw)
In-Reply-To: <CAFNhLUWCPrdymHd9zVc52vKiZNXp_tCX3Qy5p885ecrR9Yi_Lw@mail.gmail.com>

On Mon, Jan 14, 2013 at 07:20:46AM -0800, Ramesh.P wrote:
> Hi,
> 
> 
> On Sun, Jan 13, 2013 at 8:50 PM, horseriver <horserivers@gmail.com> wrote:
> 
> > On Sun, Jan 13, 2013 at 09:27:45PM -0800, Dave Hylands wrote:
> > > Hi,
> > >
> > > On Sun, Jan 13, 2013 at 11:29 AM, horseriver <horserivers@gmail.com>
> > wrote:
> > > >
> > > > hi:
> > > >
> > > >   In kernel code . some function is defined  by
> > >  __attribute__((__section__(".initcall" level ".init")))
> > > >
> > > >   what does this do ?
> > >
> > > It puts the address of the function in a linker section named
> > > .initcallX.init where X is replaced by the level.
> > >
> > > These functions are called in order to initialize various subsystems and
> > > drivers during kernel bootup.
> >
> >   Thanks!
> >
> >   Another question:
> >
> >   __attribute__((regparm(3)))    ;  what does this do ?
> >

  Thank You!

   what the use of doing like this ?  why  tell gcc  to  pass param like this ?

 
> >
> It causes the compiler to pass the argument (3 in this case) to be passed
> in registers (like EAX, ECX and EDX) instead of stack.
> 
> Thanks,
> Ramesh
> 
> 
> >
> >
> >
> > > --
> > > Dave Hylands
> > > Shuswap, BC, Canada
> > > http://www.davehylands.com
> >
> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies at kernelnewbies.org
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >

      reply	other threads:[~2013-01-14  5:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-13 19:29 what does this do ? horseriver
2013-01-14  5:27 ` Dave Hylands
2013-01-13 20:09   ` horseriver
2013-01-14  6:14     ` Dave Hylands
2013-01-14  4:50   ` horseriver
2013-01-14 14:44     ` Anuz Pratap Singh Tomar
2013-01-14  6:02       ` horseriver
2013-01-14 15:50         ` Anuz Pratap Singh Tomar
2013-01-14 15:20     ` Ramesh.P
2013-01-14  5:56       ` horseriver [this message]

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=20130114055621.GA4289@debian.localdomain \
    --to=horserivers@gmail.com \
    --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).