From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xrn03-0003in-Ue for qemu-devel@nongnu.org; Fri, 21 Nov 2014 07:07:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xrmzx-0005w4-Oc for qemu-devel@nongnu.org; Fri, 21 Nov 2014 07:07:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48090) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xrmzx-0005vw-HP for qemu-devel@nongnu.org; Fri, 21 Nov 2014 07:07:37 -0500 Date: Fri, 21 Nov 2014 12:07:14 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20141121120714.GJ3165@work-vm> References: <1412358473-31398-1-git-send-email-dgilbert@redhat.com> <1412358473-31398-34-git-send-email-dgilbert@redhat.com> <54301FEE.10403@redhat.com> <20141120114502.GE5983@work-vm> <546F29A9.5030501@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <546F29A9.5030501@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 33/47] Postcopy: Postcopy startup in migration thread List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, quintela@redhat.com, cristian.klein@cs.umu.se, qemu-devel@nongnu.org, amit.shah@redhat.com, yanghy@cn.fujitsu.com * Paolo Bonzini (pbonzini@redhat.com) wrote: > > > On 20/11/2014 12:45, Dr. David Alan Gilbert wrote: > > > For this case QEMU has atomic_read/atomic_set (corresponding to > > > __ATOMIC_RELAXED in C/C++1x), so you could use those as well. > > > > Ah, so those look like they just volatile cast anyway. > > Yeah, but it explicitly shows that the assignment is a) for a > multi-threaded operation b) using relaxed semantics. It attaches the > information to the use instead of the variable; it just happens that > volatile is the pre-C11 way to express those. OK, I'll use those anyway; Ideally what I'd have is a way to mark something so that it'd compile-time-fail if I didn't use an atomic_ on it, because it's the type of thing that I'm bound to forget somewhere. Dave > > Paolo -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK