Skip to content

Commit

Permalink
lib: open-amp: support resource table on C++ applications
Browse files Browse the repository at this point in the history
In C++ applications, methods which are meant to be implemented in C
should be wrapped in a `extern "C"` scope at the point of declaration.
This enables the correct symbol table mangling, which fixes current
linker errors in C++.

Signed-off-by: Alexander Dengg <[email protected]>
  • Loading branch information
dornbirndevelops authored and MaureenHelm committed Jul 6, 2022
1 parent 5b108be commit 21aa4a9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/open-amp/resource_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
#include <openamp/remoteproc.h>
#include <openamp/virtio.h>

#ifdef __cplusplus
extern "C" {
#endif

#if (CONFIG_OPENAMP_RSC_TABLE_NUM_RPMSG_BUFF > 0)

#define VDEV_ID 0xFF
Expand Down Expand Up @@ -75,4 +79,8 @@ inline struct fw_rsc_vdev_vring *rsc_table_get_vring1(void *rsc_table)

#endif

#ifdef __cplusplus
}
#endif

#endif

0 comments on commit 21aa4a9

Please sign in to comment.