blob: bbb12fb2ac3be65f56fde98cfcf945a10996abc6 (
plain)
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
|
#ifndef __SYS_CDEFS_H
#define __SYS_CDEFS_H
#ifdef __cplusplus
#define __BEGIN_DECLS extern "C" {
#define __END_DECLS }
#else
#define __BEGIN_DECLS
#define __END_DECLS
#endif
#define ___STRING(x) #x
#define __STRING(x) ___STRING(x)
#define __dead __attribute__((__noreturn__))
#define __used __attribute__((__used__))
#define __unused __attribute__((__unused__))
#define __packed __attribute__((__packed__))
#define __aligned(x) __attribute__((__aligned__(x)))
#define __malloc __attribute__((__malloc__))
#define __pure __attribute__((__pure__))
#define __nodiscard __attribute__((__warn_unused_result__))
#define __weak __attribute__((__weak__))
#define __naked __attribute__((__naked__))
#define __const __attribute__((__const__))
#define __predict_true(exp) __builtin_expect((exp) != 0, 1)
#define __predict_false(exp) __builtin_expect((exp) != 0, 0)
#endif
|