Fix #437, deprecate OS task ID and add replacement API for PSP exceptions #442
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe the contribution
The OS_task_prop_t had contained an
OStask_id
field which was used for reverse-mapping the OSAL task ID during exception processing by CFE. Unfortunately this was a uint32 and not compatible with any OS which used task identifiers that were not convertible to such a value (e.g.pthread_t
, or 64-bit pointers, etc).Deprecate the old field and replace with a new API that performs reverse lookup within OSAL using an abstract pointer and size, so its compatible with any OS task representation object.
Testing performed
Tested as part of testing exceptions within the scope of PR's nasa/PSP#159 and nasa/cFE#653.
Confirm that the newly-added APIs are performing as expected.
Expected behavior changes
New API to reverse lookup an OS-provided thread/task identifier back to an OSAL ID.
Any use of existing OStask_id field within the task property structure is now deprecated.
System(s) tested on
Ubuntu 20.04 LTS
VxWorks 6.9 on MCP750
Additional context
Prerequisite to the PSP/CFE PRs listed above.
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.