[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: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 04/16] linux-user: Use QemuMutex and QemuCond |
Date: |
Wed, 21 Sep 2016 18:32:04 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
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 <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.
Ok, will do.
Paolo
- [Qemu-devel] [PATCH 13/16] cpus-common: simplify locking for start_exclusive/end_exclusive, (continued)
- [Qemu-devel] [PATCH 13/16] cpus-common: simplify locking for start_exclusive/end_exclusive, Paolo Bonzini, 2016/09/12
- [Qemu-devel] [PATCH 14/16] cpus-common: Introduce async_safe_run_on_cpu(), Paolo Bonzini, 2016/09/12
- Re: [Qemu-devel] [PATCH v7 00/16] cpu-exec: Safe work in quiescent state, Richard Henderson, 2016/09/14
- [Qemu-devel] [PATCH v7 00/16] cpu-exec: Safe work in quiescent state, Paolo Bonzini, 2016/09/19
- [Qemu-devel] [PATCH 05/16] linux-user: Add qemu_cpu_is_self() and qemu_cpu_kick(), Paolo Bonzini, 2016/09/19
- [Qemu-devel] [PATCH 07/16] cpus-common: move CPU work item management to common code, Paolo Bonzini, 2016/09/19
- [Qemu-devel] [PATCH 06/16] cpus-common: move CPU list management to common code, Paolo Bonzini, 2016/09/19
- [Qemu-devel] [PATCH 08/16] cpus-common: fix uninitialized variable use in run_on_cpu, Paolo Bonzini, 2016/09/19
- [Qemu-devel] [PATCH 09/16] cpus-common: move exclusive work infrastructure from linux-user, Paolo Bonzini, 2016/09/19
- [Qemu-devel] [PATCH 10/16] docs: include formal model for TCG exclusive sections, Paolo Bonzini, 2016/09/19
- [Qemu-devel] [PATCH 11/16] cpus-common: always defer async_run_on_cpu work items, Paolo Bonzini, 2016/09/19
- [Qemu-devel] [PATCH 12/16] cpus-common: remove redundant call to exclusive_idle(), Paolo Bonzini, 2016/09/19