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

Condition Variable logic does not agree with common uses #1391

Open
BrianSipos opened this issue May 24, 2023 · 0 comments
Open

Condition Variable logic does not agree with common uses #1391

BrianSipos opened this issue May 24, 2023 · 0 comments
Labels

Comments

@BrianSipos
Copy link

Describe the bug
The current condition variable API in the main branch does not agree with the common uses in POSIX and RTEMS which means there are many use cases that are not possible with the OSAL API.

The major disconnect is that the condition variable wait should operate on an external mutex, not an internal single-use mutex. This is how POSIX and RTEMS both work, and it enables use cases where one mutex guards a resource but has multiple condition variables associated with it.

To Reproduce
This is an API bug and is present in the header and documented logic.
It is not possible to have a single guard mutex with multiple associated condition variables.

Expected behavior
The OS_CondVarWait() and OS_CondVarTimedWait() should take a handle to an external mutex to operate on, rather than an internal mutex.

System observed on:
This is an API issue and is not dependent on HW or OS versions.
This API is not present in the last release tag, so is only on the main branch.

Additional context
Add any other context about the problem here.

Reporter Info
Brian Sipos, JHU/APL

@chillfig chillfig added the bug label Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants