include/tube: remove likely branch annotations

In user-space at least, we'd be better off trusting the CPU's branch
predictor, instead of relying on our limited perception when it comes
to determining the likeliness of a condition, or every compiler to do
the right thing with respect to efficient branching.

We only have a couple of likely predictions in-tree on straightforward
conditions from the tube implementation code, which we can remove
safely.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
This commit is contained in:
Philippe Gerum 2020-12-12 19:08:25 +01:00
parent 8386dba237
commit 4be045bb76
1 changed files with 2 additions and 2 deletions

View File

@ -132,7 +132,7 @@
bool __ret = false; \
typeof((__tube)->pending.tail) __new; \
__new = tube_pull(&(__tube)->free); \
if (likely(__new)) { \
if (__new) { \
tube_push_item(&(__tube)->pending, \
__item, __new); \
__ret = true; \
@ -280,7 +280,7 @@
typeof((__tube)->pending.first[0]) *__new; \
__new = (typeof(__new)) \
tube_pull_rel(__tube, &(__tube)->free); \
if (likely(__new)) { \
if (__new) { \
tube_push_item_rel(__tube, \
&(__tube)->pending, \
__item, __new); \