From 42a9d5651f881b7f70009f85a9e1e30a20faa1b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Wed, 11 May 2016 13:29:37 +0200 Subject: [PATCH] platform: some code cleanup for px4_{posix,qurt}_tasks.cpp - __BEGIN_DECLS is for declarations not definitions - getprogname() declaration is in err.h --- src/platforms/posix/px4_layer/px4_posix_tasks.cpp | 4 +--- src/platforms/qurt/px4_layer/px4_qurt_tasks.cpp | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/platforms/posix/px4_layer/px4_posix_tasks.cpp b/src/platforms/posix/px4_layer/px4_posix_tasks.cpp index 15de261626..9b3730c7b9 100644 --- a/src/platforms/posix/px4_layer/px4_posix_tasks.cpp +++ b/src/platforms/posix/px4_layer/px4_posix_tasks.cpp @@ -58,6 +58,7 @@ #include #include +#include #define MAX_CMD_LEN 100 @@ -381,14 +382,12 @@ bool px4_task_is_running(const char *taskname) return false; } -__BEGIN_DECLS unsigned long px4_getpid() { return (unsigned long)pthread_self(); } -const char *getprogname(); const char *getprogname() { pthread_t pid = pthread_self(); @@ -427,4 +426,3 @@ int px4_prctl(int option, const char *arg2, unsigned pid) return rv; } -__END_DECLS diff --git a/src/platforms/qurt/px4_layer/px4_qurt_tasks.cpp b/src/platforms/qurt/px4_layer/px4_qurt_tasks.cpp index 1d53ed61c6..5f4ebc3ea3 100644 --- a/src/platforms/qurt/px4_layer/px4_qurt_tasks.cpp +++ b/src/platforms/qurt/px4_layer/px4_qurt_tasks.cpp @@ -64,6 +64,7 @@ #include #include +#include #define MAX_CMD_LEN 100 @@ -325,8 +326,6 @@ void px4_show_tasks() } -__BEGIN_DECLS - unsigned long px4_getpid() { pthread_t pid = pthread_self(); @@ -346,7 +345,6 @@ unsigned long px4_getpid() } -const char *getprogname(); const char *getprogname() { pthread_t pid = pthread_self(); @@ -404,4 +402,3 @@ int px4_prctl(int option, const char *arg2, unsigned pid) return rv; } -__END_DECLS