`os_task_remove()` ensures that a task does not remove itself. It does this by comparing the specified task's `t_taskid` member with that of the current task's.
This is not a reliable way to detect duplicate tasks. Task IDs are not guaranteed to be unique. If tasks are repeatedly added and removed, the `g_task_id` variable will wrap, leading to duplicate IDs. Duplicate task IDs is a bigger problem that this PR does not address. This PR just fixes `os_task_remove()` - it detects self-removal by comparing task addresses rather than task IDs. [ Full content available at: https://github.com/apache/mynewt-core/pull/1355 ] This message was relayed via gitbox.apache.org for [email protected]
