2015-08-22 08:10:32 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2015 Intel Corporation
|
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2015-08-22 08:10:32 +08:00
|
|
|
*/
|
|
|
|
|
2015-12-04 23:09:39 +08:00
|
|
|
/**
|
2015-08-22 08:10:32 +08:00
|
|
|
* @file
|
2015-10-17 04:45:02 +08:00
|
|
|
* @brief Kernel event logger support for ARM
|
2015-08-22 08:10:32 +08:00
|
|
|
*/
|
|
|
|
|
2018-09-15 01:43:44 +08:00
|
|
|
#ifndef ZEPHYR_ARCH_ARM_INCLUDE_TRACING_ARCH_H_
|
|
|
|
#define ZEPHYR_ARCH_ARM_INCLUDE_TRACING_ARCH_H_
|
2015-08-22 08:10:32 +08:00
|
|
|
|
2016-01-23 01:38:49 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2018-03-12 17:45:02 +08:00
|
|
|
#include "arch/arm/cortex_m/cmsis.h"
|
2015-08-22 08:10:32 +08:00
|
|
|
/**
|
|
|
|
* @brief Get the identification of the current interrupt.
|
|
|
|
*
|
|
|
|
* This routine obtain the key of the interrupt that is currently processed
|
|
|
|
* if it is called from a ISR context.
|
|
|
|
*
|
|
|
|
* @return The key of the interrupt that is currently being processed.
|
|
|
|
*/
|
2019-03-14 23:20:46 +08:00
|
|
|
int z_sys_current_irq_key_get(void)
|
2015-08-22 08:10:32 +08:00
|
|
|
{
|
2018-03-12 17:45:02 +08:00
|
|
|
return __get_IPSR();
|
2015-08-22 08:10:32 +08:00
|
|
|
}
|
|
|
|
|
2016-01-23 01:38:49 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2018-09-15 01:43:44 +08:00
|
|
|
#endif /* ZEPHYR_ARCH_ARM_INCLUDE_TRACING_ARCH_H_ */
|