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
+1 -1
View File
@@ -2079,7 +2079,7 @@ MavlinkReceiver::receive_thread(void *arg)
{
char thread_name[24];
sprintf(thread_name, "mavlink_rcv_if%d", _mavlink->get_instance_id());
px4_prctl(PR_SET_NAME, thread_name, getpid());
px4_prctl(PR_SET_NAME, thread_name, px4_getpid());
}
const int timeout = 500;
+1 -1
View File
@@ -232,7 +232,7 @@ private:
We allow one publisher to have an open file descriptor at the same time. */
bool _IsRemoteSubscriberPresent;
#else
unsigned long _publisher; /**< if nonzero, current publisher. Only used inside the advertise call.
px4_task_t _publisher; /**< if nonzero, current publisher. Only used inside the advertise call.
We allow one publisher to have an open file descriptor at the same time. */
#endif
int32_t _subscriber_count;