On 11/12/2017 11:23, Stefan Hajnoczi wrote: >> >> In other words, I don't see what 'QEMU_WITH_LOCK_GUARD() {}' buys us >> over '{ QEMU_LOCK_GUARD() }'. > The QEMU_WITH_LOCK_GUARD() {} syntax is nice because it's similar to > if/while/for statements. > > However, { QEMU_LOCK_GUARD() } doesn't hide a for statement in a macro > so the break statement works inside the scope. Less chance of bugs.
The same is true of a "switch" statement. Being able to break out of QEMU_WITH_LOCK_GUARD could also be a feature... Paolo > I'd be okay without QEMU_WITH_LOCK_GUARD().
signature.asc
Description: OpenPGP digital signature