mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 12:03:33 +08:00
systemcmds: convert c -> c++
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user