[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 0/2] thread: add lock guard macros
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH v2 0/2] thread: add lock guard macros |
Date: |
Mon, 16 Mar 2020 12:29:24 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 16/03/20 12:09, Stefan Hajnoczi wrote:
> Lock guards automatically call qemu_(rec_)mutex_unlock() when returning from a
> function or leaving leaving a lexical scope. This simplifies code and
> eliminates leaks (especially in error code paths).
>
> This series adds lock guards for QemuMutex and QemuRecMutex. It does not
> convert the entire tree but includes example conversions.
>
> Stefan Hajnoczi (2):
> lockable: add lock guards
> lockable: add QemuRecMutex support
>
> include/qemu/lockable.h | 67 +++++++++++++++++++++++++++++++++++++++++
> plugins/core.c | 7 ++---
> plugins/loader.c | 16 +++++-----
> util/qemu-timer.c | 23 +++++++-------
> 4 files changed, 89 insertions(+), 24 deletions(-)
>
Queued, thanks.
Paolo