You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
App IDs, Task IDs, Library IDs, and other resources are all represented by a basic uint32 identifier, which starts at 0.
Describe the solution you'd like
There should be a separate typedef for these identifiers, and 0 should be reserved as an "undefined" value (like OSAL) such that:
Control structures and globals which are memset() to zero will not alias valid entries if they contain IDs.
Alleviates the need for a separate RecordUsed boolean - 0 can indicate an unused entry, nonzero indicates a used entry
This makes everything consistent as well as being simpler and safer.
Additional context
Type should initially be a uint32 which makes this backward compatible for apps.
After this change IDs can no longer be directly used as array indices. This has already been removed/fixed in CFE itself in previous PRs.
Requester Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered:
Add a new typedef "CFE_ES_ResourceID_t" that can
replace uint32 for all ID storage and manipulation.
Initially this is just an alias to uint32 for
backward compatibility.
Convert all APIs that accept an ID to use the new
typedef.
This also reserves the value "0" as an undefined ID,
and gives a separate base value for each resource type.
Therefore even though the type is still uint32, the
different resource IDs can still be distingushed.
Add a new typedef "CFE_ES_ResourceID_t" that can
replace uint32 for all ID storage and manipulation.
Initially this is just an alias to uint32 for
backward compatibility.
Convert all APIs that accept an ID to use the new
typedef.
This also reserves the value "0" as an undefined ID,
and gives a separate base value for each resource type.
Therefore even though the type is still uint32, the
different resource IDs can still be distingushed.
Add a new typedef "CFE_ES_ResourceID_t" that can
replace uint32 for all ID storage and manipulation.
Initially this is just an alias to uint32 for
backward compatibility.
Convert all APIs that accept an ID to use the new
typedef.
This also reserves the value "0" as an undefined ID,
and gives a separate base value for each resource type.
Therefore even though the type is still uint32, the
different resource IDs can still be distingushed.
Is your feature request related to a problem? Please describe.
App IDs, Task IDs, Library IDs, and other resources are all represented by a basic
uint32
identifier, which starts at 0.Describe the solution you'd like
There should be a separate
typedef
for these identifiers, and 0 should be reserved as an "undefined" value (like OSAL) such that:memset()
to zero will not alias valid entries if they contain IDs.RecordUsed
boolean - 0 can indicate an unused entry, nonzero indicates a used entryThis makes everything consistent as well as being simpler and safer.
Additional context
Type should initially be a
uint32
which makes this backward compatible for apps.After this change IDs can no longer be directly used as array indices. This has already been removed/fixed in CFE itself in previous PRs.
Requester Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: