forked from janestreet/core_kernel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjane_common.h
More file actions
50 lines (48 loc) · 945 Bytes
/
jane_common.h
File metadata and controls
50 lines (48 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef JANE_COMMON_H
#define JANE_COMMON_H
#if __GNUC__ >= 3
# ifndef inline
# define inline inline __attribute__ ((always_inline))
# endif
# ifndef __pure
# define __pure __attribute__ ((pure))
# endif
# ifndef __const
# define __const __attribute__ ((const))
# endif
# ifndef __malloc
# define __malloc __attribute__ ((malloc))
# endif
# ifndef __unused
# define __unused __attribute__ ((unused))
# endif
# ifndef __likely
# define likely(x) __builtin_expect (!!(x), 1)
# endif
# ifndef __unlikely
# define unlikely(x) __builtin_expect (!!(x), 0)
# endif
#else
# ifndef inline
# define inline
# endif
# ifndef __pure
# define __pure
# endif
# ifndef __const
# define __const
# endif
# ifndef __malloc
# define __malloc
# endif
# ifndef __unused
# define __unused
# endif
# ifndef __likely
# define likely(x) (x)
# endif
# ifndef __unlikely
# define unlikely(x) (x)
# endif
#endif
#endif /* JANE_COMMON_H */