qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 04/16] linux-user: Use QemuMutex and QemuCond


From: Emilio G. Cota
Subject: Re: [Qemu-devel] [PATCH 04/16] linux-user: Use QemuMutex and QemuCond
Date: Wed, 21 Sep 2016 12:26:47 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, Sep 19, 2016 at 14:50:47 +0200, Paolo Bonzini wrote:
> From: Sergey Fedorov <address@hidden>
> 
> 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 <address@hidden>
> Signed-off-by: Sergey Fedorov <address@hidden>
> Reviewed-by: Alex Bennée <address@hidden>
> Signed-off-by: Alex Bennée <address@hidden>
> Message-Id: <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  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 guest 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 = PTHREAD_MUTEX_INITIALIZER;
> -static pthread_mutex_t exclusive_lock = PTHREAD_MUTEX_INITIALIZER;

Just a pet peeve of mine: this is a great opportunity to
rename cpu_list_mutex to cpu_list_lock.

                E.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]