systemcmds: convert c -> c++

This commit is contained in:
Daniel Agar
2021-12-21 09:22:49 -05:00
parent d2e931858d
commit 0029a75ab0
27 changed files with 69 additions and 111 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ px4_add_module(
MAIN perf
COMPILE_FLAGS
SRCS
perf.c
perf.cpp
DEPENDS
perf
)
@@ -39,12 +39,9 @@
#include <stdio.h>
#include <string.h>
#include <perf/perf_counter.h>
#include <lib/perf/perf_counter.h>
__EXPORT int perf_main(int argc, char *argv[]);
static void print_usage(void)
static void print_usage()
{
PRINT_MODULE_DESCRIPTION("Tool to print performance counters");
@@ -55,8 +52,7 @@ static void print_usage(void)
PRINT_MODULE_USAGE_PARAM_COMMENT("Prints all performance counters if no arguments given");
}
int perf_main(int argc, char *argv[])
extern "C" __EXPORT int perf_main(int argc, char *argv[])
{
if (argc > 1) {
if (strcmp(argv[1], "reset") == 0) {
@@ -77,5 +73,3 @@ int perf_main(int argc, char *argv[])
fflush(stdout);
return 0;
}