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 x86
|
2015-08-22 08:10:32 +08:00
|
|
|
*/
|
|
|
|
|
2015-10-17 04:45:02 +08:00
|
|
|
#ifndef __KERNEL_EVENT_LOGGER_ARCH_H__
|
|
|
|
#define __KERNEL_EVENT_LOGGER_ARCH_H__
|
2015-08-22 08:10:32 +08:00
|
|
|
|
2016-08-03 03:05:08 +08:00
|
|
|
#include <arch/x86/irq_controller.h>
|
2015-12-05 03:21:33 +08:00
|
|
|
|
2016-01-23 01:38:49 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
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.
|
|
|
|
*/
|
2015-12-05 04:58:10 +08:00
|
|
|
static inline int _sys_current_irq_key_get(void)
|
2015-08-22 08:10:32 +08:00
|
|
|
{
|
2016-08-03 03:05:08 +08:00
|
|
|
return _irq_controller_isr_vector_get();
|
2015-08-22 08:10:32 +08:00
|
|
|
}
|
|
|
|
|
2016-01-23 01:38:49 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2015-10-17 04:45:02 +08:00
|
|
|
#endif /* __KERNEL_EVENT_LOGGER_ARCH_H__ */
|