Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #437, deprecate OS task ID and add replacement API for PSP exceptions #442

Closed
wants to merge 3 commits into from

Conversation

jphickey
Copy link
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.

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.

@jphickey
Copy link
Contributor Author

Note - this is a "draft" because it is currently pending on #285/#427. Will rebase and un-draft once #427 is done.

Use separate source files and CMake-based source selection
based on feature configuration, rather than using the C
preprocessor for including/excluding different OSAL function
groups.

Refactor all implementation units to provide a separate header
file for each functional group/subsystem.  Remove "static"
declaration on internal helper functions so they can be invoked
from unit test.
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
Copy link
Contributor Author

jphickey commented May 5, 2020

This was closed mistakenly as I meant to rebase but deleted the branch on my fork instead. Re submitted as #446.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants