zephyr/arch/xtensa/core/cpu_idle.c
Anas Nashif 73008b427c tracing: move headers under include/tracing
Move tracing.h to include/tracing/ to align with subsystem reorg.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-02-07 15:58:05 -05:00

20 lines
355 B
C

/*
* Copyright (c) 2016 Cadence Design Systems, Inc.
* SPDX-License-Identifier: Apache-2.0
*/
#include <tracing/tracing.h>
void arch_cpu_idle(void)
{
sys_trace_idle();
__asm__ volatile ("waiti 0");
}
void arch_cpu_atomic_idle(unsigned int key)
{
sys_trace_idle();
__asm__ volatile ("waiti 0\n\t"
"wsr.ps %0\n\t"
"rsync" :: "a"(key));
}