Ambroise Vincent | 4128f9f | 2019-02-11 13:34:41 +0000 | [diff] [blame] | 1 | /* |
Ambroise Vincent | 8a573de | 2019-02-11 13:54:30 +0000 | [diff] [blame] | 2 | * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved. |
Ambroise Vincent | 4128f9f | 2019-02-11 13:34:41 +0000 | [diff] [blame] | 3 | * |
| 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))) |
Ambroise Vincent | 4128f9f | 2019-02-11 13:34:41 +0000 | [diff] [blame] | 17 | /* |
Ambroise Vincent | 8a573de | 2019-02-11 13:54:30 +0000 | [diff] [blame] | 18 | * For compatibility with TF-A codebase. |
Ambroise Vincent | 4128f9f | 2019-02-11 13:34:41 +0000 | [diff] [blame] | 19 | */ |
Ambroise Vincent | 4128f9f | 2019-02-11 13:34:41 +0000 | [diff] [blame] | 20 | #define __init |
Ambroise Vincent | 8a573de | 2019-02-11 13:54:30 +0000 | [diff] [blame] | 21 | |
Ambroise Vincent | 4128f9f | 2019-02-11 13:34:41 +0000 | [diff] [blame] | 22 | |
| 23 | #define __printflike(fmtarg, firstvararg) \ |
| 24 | __attribute__((__format__ (__printf__, fmtarg, firstvararg))) |
| 25 | |
| 26 | #define __weak_reference(sym, alias) \ |
| 27 | __asm__(".weak alias"); \ |
| 28 | __asm__(".equ alias, sym") |
| 29 | |
| 30 | #define __STRING(x) #x |
| 31 | #define __XSTRING(x) __STRING(x) |
| 32 | |
| 33 | #endif /* CDEFS_H */ |