Re: [PATCH 2/2] ALSA: pcm: Allow aborting mutex lock at OSS read/write loops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 08 Jan 2018 16:35:49 +0100,
Lars-Peter Clausen wrote:
> 
> On 01/08/2018 03:25 PM, Takashi Iwai wrote:
> > @@ -1438,8 +1441,11 @@ static ssize_t snd_pcm_oss_read1(struct snd_pcm_substream *substream, char __use
> >  
> >  	if ((tmp = snd_pcm_oss_make_ready(substream)) < 0)
> >  		return tmp;
> > -	mutex_lock(&runtime->oss.params_lock);
> >  	while (bytes > 0) {
> > +		if (mutex_lock_interruptible(&runtime->oss.params_lock)) {
> > +			tmp = -EINTR;
> 
> For consistency ERESTARTSYS I guess? In the end this is the same as
> signal_pending().

Right, it's a better one.


thanks,

Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux