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 #1027, defer cancellation when BSP locked #1028

Merged

Commits on May 19, 2021

  1. Fix nasa#1027, defer cancellation when BSP locked

    Resolves two related issues:
    - OS_TaskGetId does not return a valid value for tasks where cancellation
      is pending, but they are still running.  This in turn is likely to trigger
      other (bogus) debug checks which invoke OS_DEBUG and in turn do console writes.
    - The console write itself is a cancellation point, which is now done while
      holding a BSP mutex.  If canceled here, then the mutex is not released.
    
    Solution is in two parts:
    - OS_TaskGetId should return the task ID it knows about, regardless of whether
      the task is pending cancellation or not.
    - Defer cancellation of the task while the BSP is locked, ensure it reaches the
      unlock, then restore the previous cancel state.
    jphickey committed May 19, 2021
    Configuration menu
    Copy the full SHA
    8a3e0ec View commit details
    Browse the repository at this point in the history