summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorAndy Lester <andy@petdance.com>2006-02-24 08:54:35 -0600
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-02-27 11:06:30 +0000
commitb37c2d43c8bccbefe3985273e9661833102148d0 (patch)
treeb996c0398e5f83c4ed03e0b1144f10819ba27a27 /perl.h
parentee94f8101362ee382e42ec2d404d79b0ab7d17ef (diff)
downloadperl-b37c2d43c8bccbefe3985273e9661833102148d0.tar.gz
Speedups and shrinkages of SvREFCNT_inc
Message-ID: <20060224205434.GA17867@petdance.com> p4raw-id: //depot/perl@27334
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/perl.h b/perl.h
index 505c122346..7d4180d3a4 100644
--- a/perl.h
+++ b/perl.h
@@ -2957,11 +2957,19 @@ typedef pthread_key_t perl_key;
appropriate to call return. In either case, include the lint directive.
*/
#ifdef HASATTRIBUTE_NORETURN
-# define NORETURN_FUNCTION_END /* NOT REACHED */
+# define NORETURN_FUNCTION_END /* NOTREACHED */
#else
-# define NORETURN_FUNCTION_END /* NOT REACHED */ return 0
+# define NORETURN_FUNCTION_END /* NOTREACHED */ return 0
#endif
+#ifdef HASBUILTIN_EXPECT
+# define EXPECT(expr,val) __builtin_expect(expr,val)
+#else
+# define EXPECT(expr,val) (expr)
+#endif
+#define LIKELY(cond) EXPECT(cond,1)
+#define UNLIKELY(cond) EXPECT(cond,0)
+
/* Some unistd.h's give a prototype for pause() even though
HAS_PAUSE ends up undefined. This causes the #define
below to be rejected by the compiler. Sigh.