Commit 4be045bb authored by Philippe Gerum's avatar Philippe Gerum
Browse files

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's avatarPhilippe Gerum <rpm@xenomai.org>
parent 8386dba2
......@@ -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); \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment