Skip to content

Commit

Permalink
lib: system: zephyr: implement __metal_sleep_usec
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
emfend authored and arnopo committed Feb 14, 2022
1 parent af82d35 commit 695d29b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/system/zephyr/sleep.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@
#ifndef __METAL_ZEPHYR_SLEEP__H__
#define __METAL_ZEPHYR_SLEEP__H__

#include <metal/utilities.h>
#include <kernel.h>

#ifdef __cplusplus
extern "C" {
#endif

static inline int __metal_sleep_usec(unsigned int usec)
{
metal_unused(usec);
/* Fix me */
k_sleep(K_USEC(usec));
return 0;
}

Expand Down

0 comments on commit 695d29b

Please sign in to comment.