px4_getpid: return the taskmap index instead of pthread_self()

this makes it consistent with other functions, like px4_task_spawn_cmd()
and px4_task_kill()
This commit is contained in:
Beat Küng
2016-09-30 13:50:51 +02:00
committed by Julian Oes
parent a51d1bc5dc
commit 1d111cb254
6 changed files with 21 additions and 13 deletions
@@ -326,7 +326,7 @@ void px4_show_tasks()
}
unsigned long px4_getpid()
px4_task_t px4_getpid()
{
pthread_t pid = pthread_self();
//
@@ -340,10 +340,6 @@ unsigned long px4_getpid()
}
}
#ifndef __PX4_QURT
// XXX This doesn't seem to be working on QURT
PX4_ERR("px4_getpid() called from unknown thread context!");
#endif
return ~0;
}
@@ -386,7 +382,7 @@ int px4_sem_timedwait(px4_sem_t *sem, const struct timespec *ts)
return 0;
}
int px4_prctl(int option, const char *arg2, unsigned pid)
int px4_prctl(int option, const char *arg2, px4_task_t pid)
{
int rv;