From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYygJ-0003N9-K5 for qemu-devel@nongnu.org; Mon, 07 Sep 2015 11:50:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYygF-0001Fc-L1 for qemu-devel@nongnu.org; Mon, 07 Sep 2015 11:50:07 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:38570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYygF-0001EV-8P for qemu-devel@nongnu.org; Mon, 07 Sep 2015 11:50:03 -0400 Received: by wiclk2 with SMTP id lk2so88295725wic.1 for ; Mon, 07 Sep 2015 08:50:02 -0700 (PDT) References: <1440375847-17603-1-git-send-email-cota@braap.org> <1440375847-17603-5-git-send-email-cota@braap.org> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <1440375847-17603-5-git-send-email-cota@braap.org> Date: Mon, 07 Sep 2015 16:50:01 +0100 Message-ID: <87fv2q9ql2.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC 04/38] translate-all: remove volatile from have_tb_lock List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Emilio G. Cota" Cc: mttcg@listserver.greensocs.com, mark.burton@greensocs.com, a.rigo@virtualopensystems.com, qemu-devel@nongnu.org, guillaume.delbergue@greensocs.com, pbonzini@redhat.com, Frederic Konrad Emilio G. Cota writes: > This is a thread-local variable and therefore all changes > to it will be seen in order by the owning thread. There is > no need for it to be volatile. > > Signed-off-by: Emilio G. Cota > --- > translate-all.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/translate-all.c b/translate-all.c > index 901a35e..31239db 100644 > --- a/translate-all.c > +++ b/translate-all.c > @@ -130,7 +130,7 @@ static void *l1_map[V_L1_SIZE]; > TCGContext tcg_ctx; > > /* translation block context */ > -__thread volatile int have_tb_lock; > +__thread int have_tb_lock; Reviewed-by: Alex Bennée but really should be folded into the original patches. > > void tb_lock(void) > { -- Alex Bennée