All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] thread: add lock guard macros
@ 2020-03-11 12:36 Stefan Hajnoczi
  2020-03-11 12:36 ` [PATCH 1/2] thread: add QemuRecMutex lock guards Stefan Hajnoczi
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Stefan Hajnoczi @ 2020-03-11 12:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Alex Bennée, Dr. David Alan Gilbert, 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 tree but includes example conversions.

Stefan Hajnoczi (2):
  thread: add QemuRecMutex lock guards
  thread: add QemuMutex lock guards

 include/qemu/thread.h | 52 +++++++++++++++++++++++++++++++++++++++++++
 plugins/core.c        |  6 ++---
 plugins/loader.c      | 15 ++++++-------
 util/qemu-timer.c     | 22 +++++++++---------
 4 files changed, 71 insertions(+), 24 deletions(-)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-03-11 17:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-11 12:36 [PATCH 0/2] thread: add lock guard macros Stefan Hajnoczi
2020-03-11 12:36 ` [PATCH 1/2] thread: add QemuRecMutex lock guards Stefan Hajnoczi
2020-03-11 12:36 ` [PATCH 2/2] thread: add QemuMutex " Stefan Hajnoczi
2020-03-11 12:52 ` [PATCH 0/2] thread: add lock guard macros Paolo Bonzini
2020-03-11 17:06   ` Stefan Hajnoczi
2020-03-11 13:20 ` no-reply
2020-03-11 13:22 ` no-reply
2020-03-11 14:50 ` Markus Armbruster
2020-03-11 15:06   ` Paolo Bonzini
2020-03-11 17:02     ` Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.