From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2h1S-0004Mm-PW for qemu-devel@nongnu.org; Tue, 17 May 2016 11:35:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2h1P-00048c-Cw for qemu-devel@nongnu.org; Tue, 17 May 2016 11:35:02 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:33389) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2h1P-00048V-6t for qemu-devel@nongnu.org; Tue, 17 May 2016 11:34:59 -0400 Received: by mail-wm0-x244.google.com with SMTP id r12so5688825wme.0 for ; Tue, 17 May 2016 08:34:59 -0700 (PDT) Sender: Paolo Bonzini References: <1460719926-12950-1-git-send-email-pbonzini@redhat.com> <20160426105419.GK10650@stefanha-x1.localdomain> From: Paolo Bonzini Message-ID: <641c7842-13af-81d9-edfc-1e36a03b5d3c@redhat.com> Date: Tue, 17 May 2016 17:34:57 +0200 MIME-Version: 1.0 In-Reply-To: <20160426105419.GK10650@stefanha-x1.localdomain> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC PATCH resend 00/11] Make CoMutex/CoQueue/CoRwlock thread-safe List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org, famz@redhat.com, kwolf@redhat.com, berto@igalia.com On 26/04/2016 12:54, Stefan Hajnoczi wrote: > I wonder whether it would be cleaner to introduce new primitives instead > of modifying CoMutex/CoQueue. That way it would be clear whether code > is written to be thread-safe or not. Interesting suggestion. I think we have few enough CoMutexes/CoQueues (also, almost all of them in core code and/or coarse-grained) that we can do the conversion in one series, but if I'm wrong it's certainly a possibility. vdi.c is a CoMutex that I know is not thread safe, but I've done the conversion to CoRwlock and it is not hard. Thanks, Paolo