[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 0/2] thread: add lock guard macros
From: |
Markus Armbruster |
Subject: |
Re: [PATCH 0/2] thread: add lock guard macros |
Date: |
Wed, 11 Mar 2020 15:50:33 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Stefan Hajnoczi <address@hidden> writes:
> 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.
I support the move towards automatic cleanup, but I'm wary of
incremental conversion. Experience tells that outdated examples
invariably get copied / imitated, with incremental conversion struggling
to keep up.
Are we resigned to having both kinds of mutex cleanup forever?
If not, what's the plan to get the job finished, and until when?
- [PATCH 0/2] thread: add lock guard macros, Stefan Hajnoczi, 2020/03/11
- [PATCH 1/2] thread: add QemuRecMutex lock guards, Stefan Hajnoczi, 2020/03/11
- [PATCH 2/2] thread: add QemuMutex lock guards, Stefan Hajnoczi, 2020/03/11
- Re: [PATCH 0/2] thread: add lock guard macros, Paolo Bonzini, 2020/03/11
- Re: [PATCH 0/2] thread: add lock guard macros, no-reply, 2020/03/11
- Re: [PATCH 0/2] thread: add lock guard macros, no-reply, 2020/03/11
- Re: [PATCH 0/2] thread: add lock guard macros,
Markus Armbruster <=