kernel: add flexibility to k_cycle_get_32() definition
Some arches may want to define this as an inline function, or define in core arch code instead of timer driver code. Unfortunately, this means we need to remove from the footprint tests, but this is not typically a large function. Issue: ZEP-1546 Change-Id: Ic0d7a33507da855995838f4703d872cd613a2ca2 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
09648cf8ec
commit
e08d07c97d
18 changed files with 28 additions and 12 deletions
|
@ -22,6 +22,9 @@ extern "C" {
|
|||
extern unsigned int k_cpu_sleep_mode;
|
||||
extern void k_cpu_idle(void);
|
||||
extern void k_cpu_atomic_idle(unsigned int key);
|
||||
|
||||
extern uint32_t _timer_cycle_get_32(void);
|
||||
#define _arch_k_cycle_get_32() _timer_cycle_get_32()
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -20,6 +20,9 @@ extern "C" {
|
|||
|
||||
#ifndef _ASMLANGUAGE
|
||||
extern void k_cpu_idle(void);
|
||||
|
||||
extern uint32_t _timer_cycle_get_32(void);
|
||||
#define _arch_k_cycle_get_32() _timer_cycle_get_32()
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -199,6 +199,9 @@ enum nios2_exception_cause {
|
|||
BIT(NIOS2_EXCEPTION_ECC_DATA_ERR))
|
||||
|
||||
|
||||
extern uint32_t _timer_cycle_get_32(void);
|
||||
#define _arch_k_cycle_get_32() _timer_cycle_get_32()
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -109,6 +109,9 @@ static ALWAYS_INLINE void _arch_irq_unlock(unsigned int key)
|
|||
: "memory");
|
||||
}
|
||||
|
||||
extern uint32_t _timer_cycle_get_32(void);
|
||||
#define _arch_k_cycle_get_32() _timer_cycle_get_32()
|
||||
|
||||
#endif /*_ASMLANGUAGE */
|
||||
|
||||
#if defined(CONFIG_SOC_RISCV32_PULPINO)
|
||||
|
|
|
@ -488,6 +488,9 @@ extern void k_float_disable(k_tid_t thread);
|
|||
|
||||
extern void k_cpu_idle(void);
|
||||
|
||||
extern uint32_t _timer_cycle_get_32(void);
|
||||
#define _arch_k_cycle_get_32() _timer_cycle_get_32()
|
||||
|
||||
/** Nanokernel provided routine to report any detected fatal error. */
|
||||
extern FUNC_NORETURN void _NanoFatalErrorHandler(unsigned int reason,
|
||||
const NANO_ESF * pEsf);
|
||||
|
|
|
@ -136,6 +136,9 @@ extern void _irq_priority_set(uint32_t irq, uint32_t prio, uint32_t flags);
|
|||
FUNC_NORETURN void _SysFatalErrorHandler(unsigned int reason,
|
||||
const NANO_ESF *esf);
|
||||
|
||||
extern uint32_t _timer_cycle_get_32(void);
|
||||
#define _arch_k_cycle_get_32() _timer_cycle_get_32()
|
||||
|
||||
#endif /* !defined(_ASMLANGUAGE) && !defined(__ASSEMBLER__) */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue