Migrated Akaros code to use pragma once (XCC)
[akaros.git] / kern / include / compiler.h
1 #pragma once
2
3 #ifdef __GNUC__
4
5 #define likely(x) __builtin_expect(!!(x), 1)
6 #define unlikely(x) __builtin_expect(!!(x), 0)
7
8 #else /* #ifdef __GNUC__ */
9
10 #define likely(x) (x)
11 #define unlikely(x) (x)
12
13 #endif /* #ifdef __GNUC__ */