[libvirt PATCH v2 00/13] Automatic mutex management - part 4

Tim Wiederhake twiederh at redhat.com
Wed Mar 16 22:10:29 UTC 2022


Use the recently implemented VIR_LOCK_GUARD and VIR_WITH_MUTEX_LOCK_GUARD
to simplify mutex management.

V1: https://listman.redhat.com/archives/libvir-list/2022-March/229144.html

Changes since V1:
* Renamed mutex in nwfilter_driver.c
* Removed all instances where a lock guard had to be initialized with NULL
  (i.e. referencing no mutex).

Tim Wiederhake (13):
  nwfilter_driver: Statically initialize mutex
  nwfilter_driver: Split up nwfilterStateCleanup
  nwfilter_driver: Use automatic mutex management
  nwfilter_gentech: Use automatic mutex management
  nwfilter_dhcpsnoop: Replace virNWFilterSnoopActiveLock macros
  nwfilter_dhcpsnoop: Replace virNWFilterSnoopLock macros
  nwfilter_dhcpsnoop: Replace virNWFilterSnoopReqLock functions
  nwfilter_learnipaddr: Use automatic mutex management
  nwfilter_ipaddrmap: Use automatic mutex management
  virNetlinkEventAddClient: Remove goto
  virnetlink: Use automatic memory management
  remote_daemon_stream: Use automatic memory management
  qemu_conf: Use automatic memory management

 src/conf/nwfilter_ipaddrmap.c          |  80 ++---
 src/conf/virnwfilterobj.h              |   1 -
 src/nwfilter/nwfilter_dhcpsnoop.c      | 396 ++++++++-----------------
 src/nwfilter/nwfilter_driver.c         | 175 +++++------
 src/nwfilter/nwfilter_gentech_driver.c |  33 +--
 src/nwfilter/nwfilter_learnipaddr.c    |  83 ++----
 src/qemu/qemu_conf.c                   |  70 ++---
 src/remote/remote_daemon_stream.c      |  34 +--
 src/util/virnetlink.c                  | 226 +++++++-------
 9 files changed, 423 insertions(+), 675 deletions(-)

-- 
2.31.1



More information about the libvir-list mailing list