-
Notifications
You must be signed in to change notification settings - Fork 215
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
Deprecate OStask_id field from OS_task_prop_t #437
Comments
@skliper, @acudmore, @jwilmot - please comment if you have any thoughts on this, I'd like to include this as part of the overall strategy for fixing nasa/cFE#411 and nasa/cFE#76. |
Concur. |
The proposed solution sounds good to me. |
jphickey
added a commit
to jphickey/osal
that referenced
this issue
Apr 29, 2020
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
added a commit
to jphickey/osal
that referenced
this issue
Apr 30, 2020
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
added a commit
to jphickey/osal
that referenced
this issue
Apr 30, 2020
jphickey
added a commit
to jphickey/osal
that referenced
this issue
May 5, 2020
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).
astrogeco
added a commit
that referenced
this issue
May 8, 2020
Fix #437, Add new API for obtaining exception task ID
jphickey
added a commit
to jphickey/osal
that referenced
this issue
Aug 10, 2022
On CPUs with strict alignment requirements, some CFE code that uses a char-type pointer (e.g. uint8*) to compute memory addresses triggers an alignment warning when it gets cast back to the actual data type. This code should be alignment-safe already, because the address computation already takes CPU alignment requirements into account when calculating the addresses/offsets. However, the compiler still flags the final conversion from a pointer with no special alignment to something with alignment requirements. - For the CFE_SB pool buffers, using the `cpuaddr` type, which is integer in nature, avoids the warning. - For the CFE_TBL internal table pointer, use a `void*` internally to store the buffer pointer, rather than a `uint8_t*`. This changes the casting needs elsewhere.
jphickey
pushed a commit
to jphickey/osal
that referenced
this issue
Aug 10, 2022
Fix nasa#437: Avoid alignment warnings on some CPUs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
This field is not necessarily applicable to all OS types and it breaks the abstraction. OSAL should not be reporting the raw/unabstracted values back to the application.
This field is fundamentally broken in any environment where the underlying OS task ID isn't convertible to a
uint32
. This includes real systems, such as:pthread_t
is a compound data type, not an integer (POSIX specifically allows this)Currently this field serves one purpose, which is to allow the CFE ES exception processing to find the OSAL task ID associated with the exception. However, this design is being reworked in nasa/cFE#411 where more of the exception processing is done in the CFE PSP. With this, there should be no need for applications to ever use the
OStask_id
member.Describe the solution you'd like
The
OStask_id
member ofOS_task_prop_t
should be marked as deprecated. As a replacement, an new API can be added which can be invoked by the PSP/BSP to aid in exception processing. This new API should use an abstract pointer and size, not assume that the task identifier information fits within a 32-bit integer.Requester Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: