[PATCH 2/2] boilerplate: drop likely/unlikely annotations
Philippe Gerum
rpm at xenomai.org
Fri Dec 4 12:43:35 CET 2020
From: Philippe Gerum <rpm at xenomai.org>
We have no more in-tree users of these. Besides, let's assume that the
CPU's branch predictor always has better clues than we might have when
assessing the likeliness of a condition.
Bonus: this clears a recurring source of namespace clashes with C++
frameworks like Boost.
Signed-off-by: Philippe Gerum <rpm at xenomai.org>
---
include/boilerplate/compiler.h | 5 -----
1 file changed, 5 deletions(-)
diff --git a/include/boilerplate/compiler.h b/include/boilerplate/compiler.h
index 94b9f8cad..263af6b0c 100644
--- a/include/boilerplate/compiler.h
+++ b/include/boilerplate/compiler.h
@@ -29,11 +29,6 @@
#define __stringify_1(x...) #x
#define __stringify(x...) __stringify_1(x)
-#ifndef likely
-#define likely(x) __builtin_expect(!!(x), 1)
-#define unlikely(x) __builtin_expect(!!(x), 0)
-#endif
-
#ifndef __noreturn
#define __noreturn __attribute__((__noreturn__))
#endif
--
2.26.2
More information about the Xenomai
mailing list