From patchwork Mon Sep 26 07:58:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 116378 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3F43AB6F80 for ; Mon, 26 Sep 2011 17:58:39 +1000 (EST) Received: from localhost ([::1]:44857 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R865D-0006bO-Ur for incoming@patchwork.ozlabs.org; Mon, 26 Sep 2011 03:58:35 -0400 Received: from eggs.gnu.org ([140.186.70.92]:54337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8653-0006b8-Ur for qemu-devel@nongnu.org; Mon, 26 Sep 2011 03:58:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R8652-00049k-88 for qemu-devel@nongnu.org; Mon, 26 Sep 2011 03:58:25 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:52831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8652-00049c-1V for qemu-devel@nongnu.org; Mon, 26 Sep 2011 03:58:24 -0400 Received: from smtp03.web.de ( [172.20.0.65]) by fmmailgate02.web.de (Postfix) with ESMTP id 082BB1AC69CBD; Mon, 26 Sep 2011 09:58:22 +0200 (CEST) Received: from [79.52.219.46] (helo=[192.168.1.2]) by smtp03.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.110 #2) id 1R864z-0000il-00; Mon, 26 Sep 2011 09:58:21 +0200 References: <55cdae9265253263fb7dbc883d3297e52b13763f.1316537591.git.jan.kiszka@siemens.com> In-Reply-To: <55cdae9265253263fb7dbc883d3297e52b13763f.1316537591.git.jan.kiszka@siemens.com> Mime-Version: 1.0 (Apple Message framework v1084) Message-Id: <12AA37D0-AEAC-4128-AEBF-A1A18B6F934A@web.de> From: =?iso-8859-1?Q?Andreas_F=E4rber?= Date: Mon, 26 Sep 2011 09:58:19 +0200 To: Jan Kiszka X-Mailer: Apple Mail (2.1084) X-Sender: Andreas.Faerber@web.de X-Provags-ID: V01U2FsdGVkX18PM1KNUkPc6AeJaDSRNUhryUhPxtFJsbJZAI7x RdT/dHW1a92uOScacYsgIBSM7HbKpbATDWPiMPcZLUtBNbsGGL 8ay48iE3A01Rm0udVfuA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 217.72.192.227 Cc: Paolo Bonzini , Anthony Liguori , qemu-devel@nongnu.org Subject: Re: [Qemu-devel] [PATCH 6/6] audio: Switch coreaudio to QemuMutex X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Hello Jan, Am 20.09.2011 um 18:53 schrieb Jan Kiszka: > Using the error management of QemuMutex allows to simplify the code. > > CC: malc > CC: Andreas Färber > Signed-off-by: Jan Kiszka > --- > audio/coreaudio.c | 56 +++++++--------------------------------------------- > 1 files changed, 8 insertions(+), 48 deletions(-) You missed one coreaudio_unlock() occurrence in line 187. Other than that looks okay, with some more softfloat workarounds it compiles and doesn't noticeably regress on Darwin/i386 v10.6.8. Do you have a particular test case? Any parameters needed? I've never used audio in my guests. ;) Regards, Andreas diff --git a/audio/coreaudio.c b/audio/coreaudio.c index c34a593..1cb3fce 100644 --- a/audio/coreaudio.c +++ b/audio/coreaudio.c @@ -184,7 +184,7 @@ static int coreaudio_run_out (HWVoiceOut *hw, int live) core->live = live - decr; hw->rpos = core->rpos; - coreaudio_unlock (core, "coreaudio_run_out"); + qemu_mutex_unlock(&core->mutex); return decr; }