Compare commits

...

1 Commits

Author SHA1 Message Date
Ondřej Surý
8e9237a2a8 EXP: Make ISC_(UN)LIKELY no-op 2021-10-12 20:57:28 +02:00

View File

@@ -9,23 +9,10 @@
* information regarding copyright ownership.
*/
#ifndef ISC_LIKELY_H
#define ISC_LIKELY_H 1
#pragma once
/*%
* Performance
*/
#ifdef CPPCHECK
#define ISC_LIKELY(x) (x)
#define ISC_UNLIKELY(x) (x)
#else /* ifdef CPPCHECK */
#ifdef HAVE_BUILTIN_EXPECT
#define ISC_LIKELY(x) __builtin_expect(!!(x), 1)
#define ISC_UNLIKELY(x) __builtin_expect(!!(x), 0)
#else /* ifdef HAVE_BUILTIN_EXPECT */
#define ISC_LIKELY(x) (x)
#define ISC_UNLIKELY(x) (x)
#endif /* ifdef HAVE_BUILTIN_EXPECT */
#endif /* ifdef CPPCHECK */
#endif /* ISC_LIKELY_H */