Updates and fixes to Linux IOCTL CD-ROM code. Based on patch from Battler

This commit is contained in:
TomW 2016-04-04 15:15:08 +01:00
commit c9111b22a2
4 changed files with 127 additions and 63 deletions

View file

@ -67,7 +67,10 @@ int thread_wait_event(event_t *handle, int timeout)
}
pthread_mutex_lock(&event->mutex);
pthread_cond_timedwait(&event->cond, &event->mutex, &abstime);
if (timeout == -1)
pthread_cond_wait(&event->cond, &event->mutex);
else
pthread_cond_timedwait(&event->cond, &event->mutex, &abstime);
pthread_mutex_unlock(&event->mutex);
return 0;