blob: c79a23b299e4cd15c91f540de5938712e17f8372 [file] [log] [blame]
Imre Kisd8b31202020-01-28 15:24:06 +01001/*
Imre Kis941d0882020-01-28 16:16:58 +01002 * Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved.
Imre Kisd8b31202020-01-28 15:24:06 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef CDEFS_H
8#define CDEFS_H
9
10#define __dead2 __attribute__((__noreturn__))
11#define __deprecated __attribute__((__deprecated__))
12#define __packed __attribute__((__packed__))
13#define __used __attribute__((__used__))
14#define __unused __attribute__((__unused__))
15#define __aligned(x) __attribute__((__aligned__(x)))
16#define __section(x) __attribute__((__section__(x)))
Imre Kis941d0882020-01-28 16:16:58 +010017
18/* __init definition was removed because of collision with compiler's stdlib */
Imre Kisd8b31202020-01-28 15:24:06 +010019
20#define __printflike(fmtarg, firstvararg) \
21 __attribute__((__format__ (__printf__, fmtarg, firstvararg)))
22
23#define __weak_reference(sym, alias) \
24 __asm__(".weak alias"); \
25 __asm__(".equ alias, sym")
26
27#define __STRING(x) #x
28#define __XSTRING(x) __STRING(x)
29
30#endif /* CDEFS_H */