You are viewing a plain text version of this content. The canonical link for it is here.
Posted to devnull@infra.apache.org by "ccollins476ad (GitHub)" <gi...@apache.org> on 2018/08/27 20:57:56 UTC
[GitHub] [mynewt-core] ccollins476ad opened pull request #1355:
kernel/os: Don't compare t_taskid
`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 devnull@infra.apache.org
[GitHub] [mynewt-core] ccollins476ad closed pull request #1355:
kernel/os: Don't compare t_taskid
Posted by "ccollins476ad (GitHub)" <gi...@apache.org>.
[ pull request closed by ccollins476ad ]
[ Full content available at: https://github.com/apache/mynewt-core/pull/1355 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org