From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmkRQ-0007z5-QA for qemu-devel@nongnu.org; Wed, 21 Sep 2016 12:32:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmkRN-0002Ys-Hl for qemu-devel@nongnu.org; Wed, 21 Sep 2016 12:32:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmkRN-0002Yo-C9 for qemu-devel@nongnu.org; Wed, 21 Sep 2016 12:32:09 -0400 References: <1474289459-15242-1-git-send-email-pbonzini@redhat.com> <1474289459-15242-5-git-send-email-pbonzini@redhat.com> <20160921162647.GD13385@flamenco> From: Paolo Bonzini Message-ID: <7dd50de4-949f-5e19-4aea-e2eb5e86b2b7@redhat.com> Date: Wed, 21 Sep 2016 18:32:04 +0200 MIME-Version: 1.0 In-Reply-To: <20160921162647.GD13385@flamenco> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 04/16] linux-user: Use QemuMutex and QemuCond List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Emilio G. Cota" Cc: qemu-devel@nongnu.org, serge.fdrv@gmail.com, alex.bennee@linaro.org, sergey.fedorov@linaro.org On 21/09/2016 18:26, Emilio G. Cota wrote: > On Mon, Sep 19, 2016 at 14:50:47 +0200, Paolo Bonzini wrote: >> From: Sergey Fedorov >> >> Convert pthread_mutex_t and pthread_cond_t to QemuMutex and QemuCond. >> This will allow to make some locks and conditional variables common >> between user and system mode emulation. >> >> Signed-off-by: Sergey Fedorov >> Signed-off-by: Sergey Fedorov >> Reviewed-by: Alex Benn=E9e >> Signed-off-by: Alex Benn=E9e >> Message-Id: <1470158864-17651-7-git-send-email-alex.bennee@linaro.org> >> Signed-off-by: Paolo Bonzini >> --- >> linux-user/main.c | 53 +++++++++++++++++++++++++++++++---------------= ------- >> 1 file changed, 31 insertions(+), 22 deletions(-) >> >> diff --git a/linux-user/main.c b/linux-user/main.c >> index 3ad70f8..0add1b0 100644 >> --- a/linux-user/main.c >> +++ b/linux-user/main.c >> @@ -111,17 +111,25 @@ int cpu_get_pic_interrupt(CPUX86State *env) >> We don't require a full sync, only that no cpus are executing gues= t code. >> The alternative is to map target atomic ops onto host equivalents, >> which requires quite a lot of per host/target work. */ >> -static pthread_mutex_t cpu_list_mutex =3D PTHREAD_MUTEX_INITIALIZER; >> -static pthread_mutex_t exclusive_lock =3D PTHREAD_MUTEX_INITIALIZER; >=20 > Just a pet peeve of mine: this is a great opportunity to > rename cpu_list_mutex to cpu_list_lock. Ok, will do. Paolo