platform: some code cleanup for px4_{posix,qurt}_tasks.cpp

- __BEGIN_DECLS is for declarations not definitions
- getprogname() declaration is in err.h
This commit is contained in:
Beat Küng
2016-05-11 15:56:50 +02:00
parent 77c61260df
commit 42a9d5651f
2 changed files with 2 additions and 7 deletions
@@ -58,6 +58,7 @@
#include <px4_tasks.h>
#include <px4_posix.h>
#include <systemlib/err.h>
#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
@@ -64,6 +64,7 @@
#include <string>
#include <px4_tasks.h>
#include <systemlib/err.h>
#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