Fix #437, Add new API for obtaining exception task ID#446
Conversation
Deprecate the OStask_ID field within the property structure. Replace with a new API to perform a task ID reverse-lookup based on an abstract data object (the system task ID).
|
Resubmit of #442 after I mistakenly deleted the branch instead of a force-push to rebase it. |
|
This is related to the special topic on exceptions held 2020-04-30 but not explicitly reviewed during that meeting. It is a prerequisite to nasa/cFE#411. |
skliper
left a comment
There was a problem hiding this comment.
Not following OS_TaskGetInfo_Impl deprecation logic, should it be replaced with not implemented or should we plan to eventually remove the OS_TaskGetInfo API all together?
|
CCB 20200506 - APPROVED |
|
@astrogeco - @acudmore review doesn't need to hold up merge to IC, I'd shoot him an email heads up and proceed |
ghost
left a comment
There was a problem hiding this comment.
This looks good to me.
I think these changes will also help when RTOSs transition to 64 bit, because the task ID on some RTOSs is a pointer to the task control block.
Fix nasa#445, create osal api guide with doxygen
Describe the contribution
The OS_task_prop_t had contained an
OStask_idfield 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.
Fix #437
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.