Skip to content

Commit

Permalink
lib: system: fix missing metal_yield API for generic systems.
Browse files Browse the repository at this point in the history
The metal_yield API needs also to be declared for the baremetal systems.
This fix build issue in Open-amp for generic system:

/github/workspace/open-amp/lib/rpmsg/rpmsg_virtio.c:275:17:
error: implicit declaration of function 'metal_yield'
275 |                 metal_yield();
    |                 ^~~~~~~~~~~

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
  • Loading branch information
arnopo committed Oct 21, 2024
1 parent 1112f2c commit d607487
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/system/generic/sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define __METAL_GENERIC_SYS__H__

#include <limits.h>
#include <metal/cpu.h>
#include <metal/errno.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -44,6 +45,8 @@ struct metal_state {
struct metal_common_state common;
};

#define metal_yield() metal_cpu_yield()

#ifdef METAL_INTERNAL

/**
Expand Down

0 comments on commit d607487

Please sign in to comment.