mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 00:13:34 +08:00
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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user