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 #476, add global lock/unlock wrapper #478

Merged

Conversation

jphickey
Copy link
Contributor

Describe the contribution
Add a wrapper at the shared layer to provide a common location to check the status of global lock/unlock ops.

All calls to OS_Lock_Global_Impl and OS_Unlock_Global_Impl from the shared modules are replaced with calls to this wrapper.

Notably - this detects and reports the problem described in #474, in case something similar happens in the future.

Fixes #476

Testing performed
Build and execute all unit tests, and sanity check CFE operations.

Expected behavior changes
Now detects and reports errors in global mutex lock/unlock ops.

System(s) tested on
Ubuntu 20.04 (native)
RTEMS 4.11 on pc686 via QEMU

Additional context
If this patch is applied in isolation without any other changes, one will see debug trace generated as it is detecting the problem previously reported in #474:

OS_Lock_Global():634:ERROR: unable to lock global 9, error=-1
OS_Unlock_Global():677:ERROR: global 9 released by task 0x10005 when owned by task 0x0
OS_Unlock_Global():693:ERROR: unable to lock global 9, error=-1

These errors go away as soon as the PR #475 is also applied

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

Integration Candidate COMBINED 2020-04-29 and 2020-05-06
@jphickey jphickey marked this pull request as draft May 19, 2020 22:29
@jphickey
Copy link
Contributor Author

Note - this still needs a coverage test update, but the general idea can be discussed.

@jphickey jphickey force-pushed the fix-476-global-mutex-wrapper branch from 393c2ef to c426de3 Compare May 20, 2020 02:34
Add a wrapper at the shared layer to provide a common location
to check the status of global lock/unlock ops.

All calls to OS_Lock_Global_Impl and OS_Unlock_Global_Impl from
the shared modules are replaced with calls to this wrapper.
@jphickey jphickey force-pushed the fix-476-global-mutex-wrapper branch from c426de3 to 4ef9c18 Compare May 20, 2020 02:37
@jphickey jphickey marked this pull request as ready for review May 20, 2020 13:36
@jphickey jphickey added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label May 20, 2020
@astrogeco
Copy link
Contributor

CCB 20200520 - APPROVED

@skliper skliper added CCB-20200520 and removed CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) labels May 20, 2020
@astrogeco astrogeco changed the base branch from master to integration-candidate May 26, 2020 13:45
@astrogeco
Copy link
Contributor

@jphickey can you look and resolve these conflicts?

@jphickey jphickey merged commit 5c8a01c into nasa:integration-candidate May 27, 2020
@jphickey
Copy link
Contributor Author

Manually merged with conflicts resolved in 5c8a01c

@skliper skliper added this to the 5.1.0 milestone Jun 1, 2020
@jphickey jphickey deleted the fix-476-global-mutex-wrapper branch June 19, 2020 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add shared layer API for handling global mutex
3 participants