From: Takashi Iwai Subject: Re: [PATCH] alsa-lib:Make snd_atomic_write_* truly atomic Date: Fri, 13 May 2016 14:37:01 +0200 Message-ID: References: <570E2279.7060809@axis.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id D1F5F26063A for ; Fri, 13 May 2016 14:37:01 +0200 (CEST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Ricard Wanderlof Cc: Arvid =?UTF-8?B?TmlobGfDpXJk?= Lindell , Andreas x Larsson , alsa-devel List-Id: alsa-devel@alsa-project.org 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