mirror of
https://github.com/OpenAMP/libmetal.git
synced 2026-09-30 20:29:16 +08:00
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>
23 lines
376 B
C
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__ */
|