aboutsummaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/sys/cdefs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/include/sys/cdefs.h b/sys/include/sys/cdefs.h
index 152765c..110205b 100644
--- a/sys/include/sys/cdefs.h
+++ b/sys/include/sys/cdefs.h
@@ -39,6 +39,9 @@
#define __naked __attr(naked)
#define __noreturn __attr(noreturn)
+#define __likely(x) __builtin_expect(!!(x), 1)
+#define __unlikely(x) __builtin_expect(!!(x), 0)
+
/* Wrapper for inline asm */
#define __ASMV __asm__ __volatile__