version 0.0.1

This commit is contained in:
2021-10-23 16:53:40 +02:00
parent 24b5baf73b
commit 1c64f34ef4
92 changed files with 39959 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
#ifndef _RTE_BRANCH_PREDICTION_H_
#define _RTE_BRANCH_PREDICTION_H_
/**
* Check if a branch is likely to be taken.
*
* This compiler builtin allows the developer to indicate if a branch is
* likely to be taken. Example:
*
* if (likely(x > 1))
* do_stuff();
*
*/
#ifndef likely
#define likely(x) __builtin_expect(!!(x), 1)
#endif /* likely */
/**
* Check if a branch is unlikely to be taken.
*
* This compiler builtin allows the developer to indicate if a branch is
* unlikely to be taken. Example:
*
* if (unlikely(x < 1))
* do_stuff();
*
*/
#ifndef unlikely
#define unlikely(x) __builtin_expect(!!(x), 0)
#endif /* unlikely */
#endif /* _RTE_BRANCH_PREDICTION_H_ */