mirror of
https://github.com/OpenAMP/libmetal.git
synced 2026-09-23 02:24:01 +08:00
lib: system: zephyr: implement __metal_sleep_usec
The currently missing implementation causes invalid timeouts when sending remoteproc messages over virtIO. With this change, the specified timeout of 15 seconds can be achieved. This seems to be the only usage in Zephyr. Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
This commit is contained in:
committed by
Arnaud Pouliquen
parent
af82d35f7a
commit
695d29ba60
@@ -16,7 +16,7 @@
|
||||
#ifndef __METAL_ZEPHYR_SLEEP__H__
|
||||
#define __METAL_ZEPHYR_SLEEP__H__
|
||||
|
||||
#include <metal/utilities.h>
|
||||
#include <kernel.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -24,8 +24,7 @@ extern "C" {
|
||||
|
||||
static inline int __metal_sleep_usec(unsigned int usec)
|
||||
{
|
||||
metal_unused(usec);
|
||||
/* Fix me */
|
||||
k_sleep(K_USEC(usec));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user