2019-11-10 17:17:19 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2019 Carlo Caione <ccaione@baylibre.com>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* @brief Exception/interrupt context helpers for Cortex-A CPUs
|
|
|
|
*
|
|
|
|
* Exception/interrupt context helpers.
|
|
|
|
*/
|
|
|
|
|
2023-12-08 14:53:19 +01:00
|
|
|
#ifndef ZEPHYR_ARCH_ARM64_INCLUDE_EXCEPTION_H_
|
|
|
|
#define ZEPHYR_ARCH_ARM64_INCLUDE_EXCEPTION_H_
|
2019-11-10 17:17:19 +01:00
|
|
|
|
2022-05-06 10:49:15 +02:00
|
|
|
#include <zephyr/arch/cpu.h>
|
2019-11-10 17:17:19 +01:00
|
|
|
|
|
|
|
#ifdef _ASMLANGUAGE
|
|
|
|
|
|
|
|
/* nothing */
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static ALWAYS_INLINE bool arch_is_in_isr(void)
|
|
|
|
{
|
2020-11-09 08:52:37 +01:00
|
|
|
return arch_curr_cpu()->nested != 0U;
|
2019-11-10 17:17:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _ASMLANGUAGE */
|
|
|
|
|
2023-12-08 14:53:19 +01:00
|
|
|
#endif /* ZEPHYR_ARCH_ARM64_INCLUDE_EXCEPTION_H_ */
|