Commit 12543dd7 authored by Adrian Knoth's avatar Adrian Knoth Committed by GitHub
Browse files

Merge pull request #255 from jamespthomas/james/fix-wait-crash

Fix crash in JackPosixSemaphore::Wait
parents e0281d82 05f87555
...@@ -81,7 +81,6 @@ bool JackPosixSemaphore::SignalAll() ...@@ -81,7 +81,6 @@ bool JackPosixSemaphore::SignalAll()
return (res == 0); return (res == 0);
} }
/*
bool JackPosixSemaphore::Wait() bool JackPosixSemaphore::Wait()
{ {
int res; int res;
...@@ -91,17 +90,6 @@ bool JackPosixSemaphore::Wait() ...@@ -91,17 +90,6 @@ bool JackPosixSemaphore::Wait()
return false; return false;
} }
if ((res = sem_wait(fSemaphore)) != 0) {
jack_error("JackPosixSemaphore::Wait name = %s err = %s", fName, strerror(errno));
}
return (res == 0);
}
*/
bool JackPosixSemaphore::Wait()
{
int res;
while ((res = sem_wait(fSemaphore) < 0)) { while ((res = sem_wait(fSemaphore) < 0)) {
jack_error("JackPosixSemaphore::Wait name = %s err = %s", fName, strerror(errno)); jack_error("JackPosixSemaphore::Wait name = %s err = %s", fName, strerror(errno));
if (errno != EINTR) { if (errno != EINTR) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment