From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] show_boot_progress
Date: Wed, 19 Feb 2014 11:32:24 +0100 [thread overview]
Message-ID: <20140219113224.72175364@lilith> (raw)
In-Reply-To: <CACL4+3ihr4ryi4d3=r3eqG9dQXgWGC2=KodrkoavFTKKNunqeA@mail.gmail.com>
Hi Abdullah,
On Wed, 19 Feb 2014 11:44:26 +0200, Abdullah YILDIZ
<abdullah.mails@gmail.com> wrote:
> I use u-boot version 1.3.3.
Any reason to use a five-years-old release?
> The function call __show_boot_progress is
> defined in common/main.c as
>
> void inline __show_boot_progress (int val) {}
>
> There are many calls to this function in particular locations with
> specific parameters. But it does nothing. What is the purpose of this?
See below.
> Since I'm not a very good programmer, I also wonder the meaning of
> void inline (int val) __attribute__((weak,
> alias("__show_boot_progress")));
>
> Is it a directive to the compiler?
Yes, it is.
It tells the compiler that the function name 'show_boot_progress'
actually refers to function '__show_boot_progress', but that if
someother part of the program defines an actual function called
'show_boot_progress', then that definition is "strong" and will
replace the "weak" definition.
This is a common way to define a generic functionality where some
functions should be adapted on specific architectures or even boards.
Here, the boot progress framework defines a function to call to show
boot progress, but each board will have its own way of presenting that
progress to the board operator, and will implement is own "strong"
show_boot_progress function for this.
> abdullah
Amicalement,
--
Albert.
next prev parent reply other threads:[~2014-02-19 10:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-19 9:44 [U-Boot] show_boot_progress Abdullah YILDIZ
2014-02-19 10:32 ` Albert ARIBAUD [this message]
2014-02-19 13:14 ` Abdullah YILDIZ
2014-02-19 14:16 ` Albert ARIBAUD
2014-02-19 14:57 ` Abdullah YILDIZ
2014-02-19 15:37 ` Albert ARIBAUD
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=20140219113224.72175364@lilith \
--to=albert.u.boot@aribaud.net \
--cc=u-boot@lists.denx.de \
/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