Date: Fri, 12 Mar 2010 13:30:07 +0100 From: Ivan Voras <ivoras@freebsd.org> To: freebsd-arch@freebsd.org Subject: Re: likely and unlikely Message-ID: <hndc47$1ps$2@dough.gmane.org> In-Reply-To: <hndbvi$1ps$1@dough.gmane.org> References: <hndbed$vok$1@dough.gmane.org> <20100312122559.GU8200@hoeg.nl> <hndbvi$1ps$1@dough.gmane.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 03/12/10 13:27, Ivan Voras wrote: > On 03/12/10 13:26, Ed Schouten wrote: >> Hi Ivan, >> >> * Ivan Voras<ivoras@freebsd.org> wrote: >>> Wouldn't it be more convenient to have a single global definition of >>> them, under #ifdef __GNUC__ for example in sys/stddef.h ? >> >> Wouldn't it be better to have them in sys/cdefs.h? > > Yes, I think you're right. Actually, it looks like it would be best to simply add them alongside __predict_true and __predict_False in sys/cdefs.h: 306 #if __GNUC_PREREQ__(2, 96) 307 #define __predict_true(exp) __builtin_expect((exp), 1) 308 #define __predict_false(exp) __builtin_expect((exp), 0) 309 #else 310 #define __predict_true(exp) (exp) 311 #define __predict_false(exp) (exp) 312 #endif (There is nothing wrong with __predict_true and __predict_false - they are just less convenient to type.)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?hndc47$1ps$2>