aboutsummaryrefslogtreecommitdiff
path: root/src/common.h
blob: 5756c83cac0380fd9e103d1e1a516e7ec023c892 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef ORYX_COMMON_H
#define ORYX_COMMON_H

#ifdef __GNUC__
#	define likely(x)   __builtin_expect(!!(x), 1)
#	define unlikely(x) __builtin_expect(!!(x), 0)
#else
#	define __attribute__(x)
#	define __builtin_unreachable() (((char *)0)[0] = 0)
#	define likely(x)               (x)
#	define unlikely(x)             (x)
#endif

#endif /* !ORYX_COMMON_H */