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.
The CFE SB pipe ID table is not safe from aliasing or other issues.
Describe the solution you'd like
Redefine the CFE_SB_PipeID_t type to be a form of CFE_ES_ResourceID_t like many other resources have already been converted (mem pool handles, CDS blocks, etc).
Re-Use all the same management patterns of this structure.
Additional context
The only potential downside is that Resource IDs are defined as 32 bit values but Pipe IDs were only 8 bits. So this will make sizeof(CFE_SB_PipeId_t) into 4 instead of 1. But as long as apps are properly using the typedef and not assuming uint8 or otherwise depending on this being a single byte, this shouldn't be noticeable.
This is somewhat related to previous issue #100 - implementing this would be a good step in the right direction for that issue too.
Requester Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered:
As part of debugging #1073 it is clear that many SB functions - particularly in the Pipe table and Pipe IDs - are not properly locking data structures when accessing the global table(s).
Using Resource IDs as SB Pipe IDs helps find these instances of code improperly/randomly accessing the CFE_SB.PipeTbl and therefore is important to finding and solving the race conditions.
Move certain definitions related to the CFE_ES_ResourceID_t type
into the global CFE include files. This introduces two new headers:
cfe_resourceid.h (public)
cfe_resourceid_internal.h (private to CFE core apps)
This allows other CFE core apps, such as SB, to use the
CFE_ES_ResourceID_t using the same manipulators.
Move certain definitions related to the CFE_ES_ResourceID_t type
into the global CFE include files. This introduces two new headers:
cfe_resourceid.h (public)
cfe_resourceid_internal.h (private to CFE core apps)
This allows other CFE core apps, such as SB, to use the
CFE_ES_ResourceID_t using the same manipulators.
Is your feature request related to a problem? Please describe.
The CFE SB pipe ID table is not safe from aliasing or other issues.
Describe the solution you'd like
Redefine the CFE_SB_PipeID_t type to be a form of CFE_ES_ResourceID_t like many other resources have already been converted (mem pool handles, CDS blocks, etc).
Re-Use all the same management patterns of this structure.
Additional context
The only potential downside is that Resource IDs are defined as 32 bit values but Pipe IDs were only 8 bits. So this will make
sizeof(CFE_SB_PipeId_t)
into 4 instead of 1. But as long as apps are properly using the typedef and not assuminguint8
or otherwise depending on this being a single byte, this shouldn't be noticeable.This is somewhat related to previous issue #100 - implementing this would be a good step in the right direction for that issue too.
Requester Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: