Files
libmetal/lib/processor/hosted/cpu.h
T
Alberto Escolar Piedras dabb14f677 Add support for hosted test environments
Add a new hosted test environment "processor".

This is meant as a build target used when the
code is not built for a real target
but as part of a test in a hosted environment
(for ex. as a test environment like Zephyr's
native_sim target).

When building for this target PROJECT_PROCESSOR
should be set as "hosted".

In this, the "metal_sleep_usec()" call
is expected to be provided by the system folder
headers.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-10 14:04:39 +01:00

23 lines
376 B
C

/*
* Copyright (c) 2023 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/*
* @file hosted/cpu.h
* @brief Hosted environment CPU specific primitives
*/
#include <metal/sys.h>
#ifndef __METAL_HOSTED_CPU__H__
#define __METAL_HOSTED_CPU__H__
static inline void metal_cpu_yield(void)
{
metal_wait_usec(10);
}
#endif /* __METAL_HOSTED_CPU__H__ */