Skip to content

thread: add lock guard macros

Stefan Hajnoczi qemu-devel 2 versions – Applied

Status from this message: Queued, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyApplied
  2. v12 patches 5 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2lockable: add lock guardsinclude/qemu/lockable.h util/qemu-timer.c+76 -120 replies
2/2lockable: add QemuRecMutex supportinclude/qemu/lockable.h plugins/core.c plugins/loader.c+13 -120 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

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

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(-)
Signature · 1 line
2.24.1