kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: CRISTIAN ANDRES VARGAS GONZALEZ <vargascristian@americana.edu.co>
To: kernelnewbies@kernelnewbies.org
Subject: Re: Kernelnewbies Digest, Vol 107, Issue 9
Date: Thu, 10 Oct 2019 08:42:06 -0500	[thread overview]
Message-ID: <CABfRCzgGHqrAD9NRstGkCo0xZa0beJmmJxemT_7bfCQTxnjjNQ@mail.gmail.com> (raw)
In-Reply-To: <mailman.1.1570636802.1872.kernelnewbies@kernelnewbies.org>


[-- Attachment #1.1: Type: text/plain, Size: 3486 bytes --]

Thank you very much, I understand better, I will continue checking the
links that happened to me

regards
att cristian vargas


El mié., 9 oct. 2019 a las 11:00, <kernelnewbies-request@kernelnewbies.org>
escribió:

> Send Kernelnewbies mailing list submissions to
>         kernelnewbies@kernelnewbies.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> or, via email, send a message with subject or body 'help' to
>         kernelnewbies-request@kernelnewbies.org
>
> You can reach the person managing the list at
>         kernelnewbies-owner@kernelnewbies.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Kernelnewbies digest..."
>
>
> Today's Topics:
>
>    1. Re: Are there global constructors in the Linux kernel?
>       (Konstantin Andreev)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 09 Oct 2019 11:54:26 +0300
> From: Konstantin Andreev <andreev@swemel.ru>
> To: CRISTIAN ANDRES VARGAS GONZALEZ <vargascristian@americana.edu.co>,
>         kernelnewbies@kernelnewbies.org
> Subject: Re: Are there global constructors in the Linux kernel?
> Message-ID: <5D9DA042.2090205@swemel.ru>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> Hi, Cristian. There are, a kinda of ...
>
> kernel/taskstats.c:
> | late_initcall(taskstats_init);
>
> kernel/rcu/update.c:
> | early_initcall(check_cpu_stall_init);
>
> There is a whole set of macros STAGE_initcall() in include/linux/init.h
>
> Arguments to these macros invokations are accounted and called by kernel
> initialization code at strictly defined stages of initialization. See
> https://0xax.gitbooks.io/linux-insides/content/Concepts/linux-cpu-3.html
>
> The only thing that is run before kernel is <a series of>
> platform-specific boot loaders, maybe under hypervisor control. Compiler
> has no power to insert something in between.
>
> Regards, Konstantin.
>
> CRISTIAN ANDRES VARGAS GONZALEZ, 09 Oct 2019 06:44 MSK:
> >
> > Good day
> >
> >   I have been doing a little kernel following some repositories of
> GitHub, videos and wikis, and I have found a topic that leaves me with
> doubts, the theme is the global constructors.
> >
> > Suppose I write a program in c, for the user space, for my code to run I
> must have the main function
> > int main() { /*Code*/}
> >
> > The gcc compiler searches for this function to run my program, but
> before that happens, I can use the global constructors and write a code
> that runs before the main function, but in the case of writing a kernel,
> why do I need to run lines of code before the kernel is executed ?, I
> understand that when writing a kernel there is no main function and that it
> is disabled to indicate it to the compiler. In the Linux kernel are there
> global constructors? If so, what things are executed before starting the
> kernel?
> > att: cristian vargas.
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
> ------------------------------
>
> End of Kernelnewbies Digest, Vol 107, Issue 9
> *********************************************
>

[-- Attachment #1.2: Type: text/html, Size: 5581 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

           reply	other threads:[~2019-10-10 13:42 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <mailman.1.1570636802.1872.kernelnewbies@kernelnewbies.org>]

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=CABfRCzgGHqrAD9NRstGkCo0xZa0beJmmJxemT_7bfCQTxnjjNQ@mail.gmail.com \
    --to=vargascristian@americana.edu.co \
    --cc=kernelnewbies@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).