From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVKz0-0006H1-6C for qemu-devel@nongnu.org; Fri, 28 Aug 2015 10:50:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZVKyw-0001xg-UN for qemu-devel@nongnu.org; Fri, 28 Aug 2015 10:50:22 -0400 Received: from mail-vk0-f54.google.com ([209.85.213.54]:36015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVKyw-0001xR-R6 for qemu-devel@nongnu.org; Fri, 28 Aug 2015 10:50:18 -0400 Received: by vkbc123 with SMTP id c123so10439320vkb.3 for ; Fri, 28 Aug 2015 07:50:18 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1439397664-70734-4-git-send-email-pbonzini@redhat.com> References: <1439397664-70734-1-git-send-email-pbonzini@redhat.com> <1439397664-70734-4-git-send-email-pbonzini@redhat.com> From: Peter Maydell Date: Fri, 28 Aug 2015 15:49:58 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: mttcg@greensocs.com, QEMU Developers , =?UTF-8?B?S09OUkFEIEZyw6lkw6lyaWM=?= On 12 August 2015 at 17:40, Paolo Bonzini wrote: > From: KONRAD Frederic > > spinlock is only used in two cases: > * cpu-exec.c: to protect TranslationBlock > * mem_helper.c: for lock helper in target-i386 (which seems broken). > > It's a pthread_mutex_t in user-mode so better using QemuMutex directly in this > case. > It allows as well to reuse tb_lock mutex of TBContext in case of multithread > TCG. The line wrapping in this commit message (and the grammar) looks a bit off... > Signed-off-by: KONRAD Frederic > Message-Id: <1439220437-23957-5-git-send-email-fred.konrad@greensocs.com> > Signed-off-by: Paolo Bonzini > --- > cpu-exec.c | 15 +++------------ > include/exec/exec-all.h | 4 ++-- > linux-user/main.c | 6 +++--- > target-i386/cpu.h | 3 +++ > target-i386/mem_helper.c | 25 ++++++++++++++++++++++--- > target-i386/translate.c | 2 ++ > tcg/tcg.h | 4 ++++ > translate-all.c | 34 ++++++++++++++++++++++++++++++++++ > 8 files changed, 73 insertions(+), 20 deletions(-) After this commit it looks like we have no users of spinlock_t at all. It would be good to have a followup patch which deleted include/exec/spinlock.h. Otherwise Reviewed-by: Peter Maydell thanks -- PMM