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 #1073, software bus locking #1092

Merged
merged 2 commits into from
Jan 25, 2021

Commits on Jan 15, 2021

  1. Fix nasa#985, globalize "resource ID" definitions

    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.
    jphickey committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    6b5f77a View commit details
    Browse the repository at this point in the history
  2. Fix nasa#1073, refactor SB API for proper global locks

    Significant refactor of many SB API calls to address inconsistencies
    with respect to locking and unlocking of global data structures.
    
    First this updates the definition of CFE_SB_PipeId_t to use the
    CFE_ES_ResourceID_t base type, and a new ID range.  Notably this
    prevents direct access to the CFE_SB.PipeTbl global, forcing
    code to go through the proper lookup routine, which should only
    be done while locked.
    
    All API implementations follow the same general pattern:
    
    - Initial checks/queries while unlocked
    - Lock SB global
    - Lookups and/or modifications to the pipe table/routing info
    - Unlock SB global
    - Invoke other subsystems (e.g. OSAL)
    - Re-lock SB global (if needed) do final update, and unlock again
    - Send all events
    
    All error counters should be updated at the end, while still locked.
    All event processing is deferred to the end of each function, after
    all other processing is done.
    jphickey committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    b17cd1e View commit details
    Browse the repository at this point in the history