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-04-06 19:48:53 +08:00
|
|
|
#ifndef __KERNEL_TRACING_H__
|
|
|
|
#define __KERNEL_TRACING_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.
|
|
|
|
*/
|
|
|
|
int _sys_current_irq_key_get(void)
|
|
|
|
{
|
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-04-06 19:48:53 +08:00
|
|
|
#endif /* __KERNEL_TRACING_H__ */
|