Commit ceb1ebdb authored by sletz's avatar sletz
Browse files

Fix JackPosixSemaphore::TimedWait : same behavior as JackPosixSemaphore::Wait regarding EINTR.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4023 0c269be4-1314-0410-8aa9-9f06e86f4224
parent fb033ff6
......@@ -30,6 +30,10 @@ Arnold Krille
Jackdmp changes log
---------------------------
2010-06-13 Stephane Letz <letz@grame.fr>
* Fix JackPosixSemaphore::TimedWait : same behavior as JackPosixSemaphore::Wait regarding EINTR.
2010-05-31 Stephane Letz <letz@grame.fr>
* Fix from Fernando Lopez-Lezcano for compilation on fc13.
......
......@@ -118,10 +118,12 @@ bool JackPosixSemaphore::TimedWait(long usec)
time.tv_sec += tv_usec / 1000000;
time.tv_nsec = (tv_usec % 1000000) * 1000;
if ((res = sem_timedwait(fSemaphore, &time)) != 0) {
while ((res = sem_timedwait(fSemaphore, &time)) < 0) {
jack_error("JackPosixSemaphore::TimedWait err = %s", strerror(errno));
jack_log("now %ld %ld ", now.tv_sec, now.tv_usec);
jack_log("next %ld %ld ", time.tv_sec, time.tv_nsec/1000);
if (errno != EINTR)
break;
}
return (res == 0);
}
......
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