diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-03-05 02:10:05 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-03-06 00:16:06 -0500 |
commit | 966a8f38b21a4f862fe0bf796664d82d9553b391 (patch) | |
tree | 53fc5ee132acc8736c173e54cf0b3c6af771aec2 /localdecls.h | |
parent | libsandbox: push down constructor init (diff) | |
download | sandbox-966a8f38b21a4f862fe0bf796664d82d9553b391.tar.gz sandbox-966a8f38b21a4f862fe0bf796664d82d9553b391.tar.bz2 sandbox-966a8f38b21a4f862fe0bf796664d82d9553b391.zip |
libsandbox: add likely/unlikely support
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'localdecls.h')
-rw-r--r-- | localdecls.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/localdecls.h b/localdecls.h index 3992834..590654d 100644 --- a/localdecls.h +++ b/localdecls.h @@ -113,4 +113,7 @@ typedef struct user_regs_struct trace_regs; #define attribute_hidden __attribute__((visibility("hidden"))) +#define likely(x) __builtin_expect(!!(x), 1) +#define unlikely(x) __builtin_expect(!!(x), 0) + #endif |