DPDK  21.11.8
rte_branch_prediction.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2014 Intel Corporation
3  */
4 
10 #ifndef _RTE_BRANCH_PREDICTION_H_
11 #define _RTE_BRANCH_PREDICTION_H_
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
27 #ifndef likely
28 #define likely(x) __builtin_expect(!!(x), 1)
29 #endif /* likely */
30 
41 #ifndef unlikely
42 #define unlikely(x) __builtin_expect(!!(x), 0)
43 #endif /* unlikely */
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 #endif /* _RTE_BRANCH_PREDICTION_H_ */