Skip to content
Snippets Groups Projects
Commit 42a9d565 authored by Beat Küng's avatar Beat Küng
Browse files

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

- __BEGIN_DECLS is for declarations not definitions
- getprogname() declaration is in err.h
parent 77c61260
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment