From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Philippe Gerum <rpm@xenomai.org>
Cc: Jan Kiszka <jan.kiszka@web.de>,
"Xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] Rescnt imbalance in rtdm_mutex_timedlock
Date: Thu, 27 Mar 2014 19:35:54 +0100 [thread overview]
Message-ID: <53346F8A.2060008@xenomai.org> (raw)
In-Reply-To: <53346CF7.2020805@xenomai.org>
On 03/27/2014 07:24 PM, Philippe Gerum wrote:
> I'm unsure we really need to take a chance at giving such hint. Modern
> CPUs tend to have branch prediction right.
Not to mention the fact that the compiler may not use the information
used by likely/unlikely, or may not be able use it in a sensible way.
Typically, for code such as
if (unlikely(condition))
return 0;
I do not see that it makes sense for the compiler to "jump out of hot
path", for a return 0, it will put the return 0 in place, there is
nothing to win by jumping away to then just return.
--
Gilles.
next prev parent reply other threads:[~2014-03-27 18:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-25 11:45 [Xenomai] Rescnt imbalance in rtdm_mutex_timedlock Erwin Pranz
2014-03-26 16:49 ` Henri Roosen
2014-03-26 23:07 ` Gilles Chanteperdrix
2014-03-27 9:41 ` Philippe Gerum
2014-03-27 15:02 ` Henri Roosen
2014-03-27 16:26 ` Philippe Gerum
2014-03-27 18:04 ` Jan Kiszka
2014-03-27 18:24 ` Philippe Gerum
2014-03-27 18:31 ` Jan Kiszka
2014-03-27 18:39 ` Gilles Chanteperdrix
2014-03-27 20:18 ` Lowell Gilbert
2014-03-28 8:32 ` Philippe Gerum
2014-03-27 18:35 ` Gilles Chanteperdrix [this message]
2014-03-28 9:52 ` Erwin Pranz
2014-03-28 10:14 ` Philippe Gerum
2014-03-28 11:14 ` Erwin Pranz
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=53346F8A.2060008@xenomai.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=jan.kiszka@web.de \
--cc=rpm@xenomai.org \
--cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.