mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
pcm: add SND_PCM_EINTR open mode
Add possibility to return -EINTR instead waiting for the event. The applications may want to handle -EINTR condition themselves. BugLink: https://github.com/alsa-project/alsa-lib/issues/228 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
e2d9e41174
commit
d6d5982d3a
2 changed files with 3 additions and 1 deletions
|
|
@ -2938,7 +2938,7 @@ int snd_pcm_wait_nocheck(snd_pcm_t *pcm, int timeout)
|
|||
err_poll = poll(pfd, npfds, timeout);
|
||||
__snd_pcm_lock(pcm->fast_op_arg);
|
||||
if (err_poll < 0) {
|
||||
if (errno == EINTR && !PCMINABORT(pcm))
|
||||
if (errno == EINTR && !PCMINABORT(pcm) && !(pcm->mode & SND_PCM_EINTR))
|
||||
continue;
|
||||
return -errno;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue