Re: [PATCH v2 0/2] thread: add lock guard macros

2020-03-16 Thread Paolo Bonzini
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

[PATCH v2 0/2] thread: add lock guard macros

2020-03-16 Thread Stefan Hajnoczi
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