[Top][All Lists]

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

Re: [Qemu-block] [Qemu-devel] Block layer complexity: what to do to keep

From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] Block layer complexity: what to do to keep it under control?
Date: Fri, 1 Dec 2017 13:27:37 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 12/01/2017 11:03 AM, Paolo Bonzini wrote:
Just my 2 cents on the language topic, as in general I agree completely
with Stefan.

Luckily, several benefits don't require a full rewrite or language switch:

- readability from RAII-style code.  If this is important enough, we
could actually use GCC __attribute__((cleanup)) or, heaven forbid,
slowly introduce C++ in QEMU's code base.

This one is cool, and supported by both gcc and clang (and we really don't have any example of anyone clamoring for a different compiler). For example, here's what I recently added to nbdkit to make it MUCH easier to properly remember to unlock a mutex on all exit paths from a scope:


Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

reply via email to

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