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

dubious pthread cond var usage in pa_jack.c #879

Open
RossBencina opened this issue Jan 21, 2024 · 0 comments
Open

dubious pthread cond var usage in pa_jack.c #879

RossBencina opened this issue Jan 21, 2024 · 0 comments
Labels
src-jack JACK Audio Connection Kit Host API /src/hostapi/jack

Comments

@RossBencina
Copy link
Collaborator

As noted in a comment on #820 pa_jack.c is not using posix condition variables correctly:

  1. WaitCondition() and its callers are not running a loop to deal with spurious wakeups (which are a thing for pthread cond vars)
  2. WaitCondition() and its callers are not using cond vars correctly: there should be a variable (or variables) associated with the cond var that are used to signal/check the desired condition. by itself a cond var is just a wakeup mechanism, unlike a semaphore or a Windows Event object a cond var doesn't encode any information about whether the condition has been met, infact it can wake up spuriously and signal no error.
@RossBencina RossBencina added the src-jack JACK Audio Connection Kit Host API /src/hostapi/jack label Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src-jack JACK Audio Connection Kit Host API /src/hostapi/jack
Projects
None yet
Development

No branches or pull requests

1 participant