diff options
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h new file mode 100644 index 0000000..be88f0b --- /dev/null +++ b/src/common.h @@ -0,0 +1,13 @@ +#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 likely(x) (x) +# define unlikely(x) (x) +#endif + +#endif /* !ORYX_COMMON_H */ |