-
Notifications
You must be signed in to change notification settings - Fork 253
Description
Is your feature request related to a problem? Please describe.
The osal_id_t type is currently just a plain uint32 to make it backward-compatible. The problem is that a plain number does not convey the purpose/intent of this ID value. Users can still do things like addition, subtraction, or interchange with other numbers, which are all invalid for a number being used as an ID.
As long as users are using the osal_id_t type and the associated checks/conversions also provided by OSAL (e.g. OS_ObjectIdDefined, etc) then this should be transparent.
Describe the solution you'd like
Make osal_id_t type-safe
Additional context
This was the intent all along with creating a separate osal_id_t typedef and using it across the CFE and PSP.
It does depend on having all the dependent code using the typedef, so probably want to stage this in using OSAL_OMIT_DEPRECATED flag or similar, so we can find the things that are still broken in this regard.
Requester Info
Joseph Hickey, Vantage Systems, Inc.