[inc][c++] add some additional __BEGIN_CDECL/__END_CDECLS to various global headers

Just a few that were missed, and picked up with some additional C++ code.
This commit is contained in:
Travis Geiselbrecht
2021-01-19 22:17:15 -08:00
parent 3083f63253
commit 7033559d38
10 changed files with 37 additions and 2 deletions

View File

@@ -12,6 +12,8 @@
#include <stddef.h>
#include <sys/types.h>
__BEGIN_CDECLS
/* command args */
typedef struct {
const char *str;
@@ -27,6 +29,8 @@ typedef int (*console_cmd_func)(int argc, const console_cmd_args *argv);
#define CMD_AVAIL_PANIC (0x1 << 1)
#define CMD_AVAIL_ALWAYS (CMD_AVAIL_NORMAL | CMD_AVAIL_PANIC)
__END_CDECLS
/* Register a static block of commands at init time when lib/console is
* paret of the build. Otherwise stub out these definitions so that they do
* not get included.
@@ -47,4 +51,5 @@ typedef int (*console_cmd_func)(int argc, const console_cmd_args *argv);
#define STATIC_COMMAND(command_str, help_str, func)
#define STATIC_COMMAND_MASKED(command_str, help_str, func, availability_mask)
#endif

View File

@@ -10,6 +10,8 @@
#include <lk/compiler.h>
#include <sys/types.h>
__BEGIN_CDECLS
/*
* LK's init system
*/
@@ -69,3 +71,5 @@ struct lk_init_struct {
#define LK_INIT_HOOK(_name, _hook, _level) \
LK_INIT_HOOK_FLAGS(_name, _hook, _level, LK_INIT_FLAG_PRIMARY_CPU)
__END_CDECLS

View File

@@ -10,7 +10,10 @@
#include <lk/compiler.h>
#include <sys/types.h>
__BEGIN_CDECLS
void lk_main(ulong arg0, ulong arg1, ulong arg2, ulong arg3) __NO_RETURN __EXTERNALLY_VISIBLE;
void lk_secondary_cpu_entry(void);
void lk_init_secondary_cpus(uint secondary_cpu_count);
__END_CDECLS