mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-27 18:20:38 +08:00
fix(posix): don't pthread_join the calling thread
This commit is contained in:
1 parent
2c599bf5cf
commit
4a51266488
1 file changed
-1
@@ -305,7 +305,6 @@ int px4_task_delete(px4_task_t id)
|
||||
|
||||
// If current thread then exit, otherwise cancel
|
||||
if (pthread_self() == pid) {
|
||||
pthread_join(pid, nullptr);
|
||||
taskmap[id].isused = false;
|
||||
pthread_mutex_unlock(&task_mutex);
|
||||
pthread_exit(nullptr);
|
||||
|
||||
Reference in new issue
Block a user