Browse Source

Correct JackFifo::TimedWait for EINTR handling.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3560 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/v1.9.3
sletz 16 years ago
parent
commit
892b9b44ae
2 changed files with 12 additions and 4 deletions
  1. +4
    -0
      ChangeLog
  2. +8
    -4
      posix/JackFifo.cpp

+ 4
- 0
ChangeLog View File

@@ -25,6 +25,10 @@ Paul Davis
Jackdmp changes log
---------------------------

2009-06-16 Stephane Letz <letz@grame.fr>
* Correct JackFifo::TimedWait for EINTR handling.

2009-06-05 Stephane Letz <letz@grame.fr>
* Correct jack_set_error_function, jack_set_info_function and jack_set_thread_creator functions.


+ 8
- 4
posix/JackFifo.cpp View File

@@ -101,12 +101,16 @@ bool JackFifo::TimedWait(long usec)
// Does not work on OSX ??
bool JackFifo::TimedWait(long usec)
{
assert(fFifo >= 0);
if ((poll(&fPoll, 1, usec / 1000) < 0) && (errno != EINTR)) {
jack_error("JackFifo::TimedWait name = %s err = %s", fName, strerror(errno));
int res;
if (fFifo < 0) {
jack_error("JackFifo::TimedWait name = %s already desallocated!!", fName);
return false;
}
do {
res = poll(&fPoll, 1, usec / 1000);
} while (res < 0 && errno == EINTR);

if (fPoll.revents & POLLIN) {
return Wait();


Loading…
Cancel
Save