2 * Copyright (c) Meta Platforms, Inc. and affiliates.
5 * This source code is licensed under both the BSD-style license (found in the
6 * LICENSE file in the root directory of this source tree) and the GPLv2 (found
7 * in the COPYING file in the root directory of this source tree).
11 * Compiler hints to indicate the fast path of an "if" branch: whether
12 * the if condition is likely to be true or false.
14 * @author Tudor Bosman (tudorb@fb.com)
22 #if defined(__GNUC__) && __GNUC__ >= 4
23 #define LIKELY(x) (__builtin_expect((x), 1))
24 #define UNLIKELY(x) (__builtin_expect((x), 0))
27 #define UNLIKELY(x) (x)