Message-ID: <53346F8A.2060008@xenomai.org> Date: Thu, 27 Mar 2014 19:35:54 +0100 From: Gilles Chanteperdrix MIME-Version: 1.0 References: <53316C4C.6000708@sigmatek.at> <53335D9A.9040902@xenomai.org> <5333F22F.70805@xenomai.org> <53345143.7000009@xenomai.org> <53346835.4030202@web.de> <53346CF7.2020805@xenomai.org> In-Reply-To: <53346CF7.2020805@xenomai.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] Rescnt imbalance in rtdm_mutex_timedlock List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Philippe Gerum Cc: Jan Kiszka , "Xenomai@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.