Skip to content

Fix #437, Add new API for obtaining exception task ID#446

Merged
astrogeco merged 1 commit into
nasa:integration-candidatefrom
jphickey:fix-437-exception-api
May 8, 2020
Merged

Fix #437, Add new API for obtaining exception task ID#446
astrogeco merged 1 commit into
nasa:integration-candidatefrom
jphickey:fix-437-exception-api

Conversation

@jphickey

@jphickey jphickey commented May 5, 2020

Copy link
Copy Markdown
Contributor

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.

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.

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).
@jphickey

jphickey commented May 5, 2020

Copy link
Copy Markdown
Contributor Author

Resubmit of #442 after I mistakenly deleted the branch instead of a force-push to rebase it.

@jphickey jphickey added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label May 5, 2020
@jphickey

jphickey commented May 5, 2020

Copy link
Copy Markdown
Contributor Author

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.

@jphickey jphickey requested review from a user and skliper May 5, 2020 18:23

@skliper skliper left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@astrogeco

Copy link
Copy Markdown
Contributor

CCB 20200506 - APPROVED

@astrogeco astrogeco removed the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label May 6, 2020
@astrogeco astrogeco changed the base branch from master to integration-candidate May 8, 2020 19:16
@astrogeco astrogeco added CCB:Approved Indicates code review and approval by community CCB IC-20200429 labels May 8, 2020
@astrogeco

Copy link
Copy Markdown
Contributor

@skliper and @jphickey do we still need @acudmore to review?

@skliper

skliper commented May 8, 2020

Copy link
Copy Markdown
Contributor

@astrogeco - @acudmore review doesn't need to hold up merge to IC, I'd shoot him an email heads up and proceed

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@astrogeco astrogeco merged commit 998377b into nasa:integration-candidate May 8, 2020
@jphickey jphickey deleted the fix-437-exception-api branch May 14, 2020 13:38
@skliper skliper added this to the 5.1.0 milestone Jun 1, 2020
jphickey pushed a commit to jphickey/osal that referenced this pull request Aug 10, 2022
Fix nasa#445, create osal api guide with doxygen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CCB:Approved Indicates code review and approval by community CCB

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate OStask_id field from OS_task_prop_t

3 participants