[alsa-devel] [PATCH] alsa-lib:Make snd_atomic_write_* truly atomic

Takashi Iwai tiwai at suse.de
Fri May 13 14:37:01 CEST 2016


On Fri, 13 May 2016 14:26:59 +0200,
Ricard Wanderlof wrote:
> 
> 
> On Thu, 12 May 2016, Takashi Iwai wrote:
> 
> > Yeah, that's why I stated the primary question.  The atomic operation
> > there is mostly cosmetic, not really helpful.  In the whole other
> > operation, we don't guarantee the thread safety at all.  So,
> > implementing the atomic op only in a very small part of the whole code
> > appears like a superfluous optimization to me.
> 
> The question is, if we decide to remove this atomic stuff, how do we 
> verify that it actually causes no problems, on all architectures, etc?

It's not what one can show in 100%, as you know.  And, it's the reason
why the code is still left over years...

IMO, we just need to make a clear statement about the thread safety of
alsa-lib.  For a single threaded op, it can't give any regression, of
course.


Takashi


More information about the Alsa-devel mailing list