Ken Liu | f250b8b | 2019-12-27 16:31:24 +0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2019, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #ifndef __TFM_ASSERT_H__ |
| 9 | #define __TFM_ASSERT_H__ |
| 10 | |
| 11 | #include "tfm_log_raw.h" |
| 12 | |
| 13 | /* Functions and macros in this file is for 'thread mode' usage. */ |
| 14 | |
| 15 | #define TFM_ASSERT(cond) \ |
| 16 | do { \ |
| 17 | if (!(cond)) { \ |
| 18 | tfm_log_printf("Assert:%s:%d", __FUNCTION__, __LINE__); \ |
| 19 | while (1) \ |
| 20 | ; \ |
| 21 | } \ |
| 22 | } while (0) |
| 23 | |
| 24 | #endif /* __TFM_ASSERT_H__ */ |