[RFC PATCH 0/2] virObject for reference-counting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



virObject is a base struct that manages reference-counting. structs
that need the ability of reference-counting can inherit from
virObject and implement ref/unref interface easily.

The goal of this series is to make reference-counting easy to use,
and improve the current libvir reference-counting mechanism. The
plan is to update all existing structs that use reference-counting
to use virObject if virObject is acceptable.

Patch 1 implements virObject, patch 2 is an illstration of usage of
virObject. This series is in draft stage, any comments are welcome.


Hu Tao (2):
  Add virObject.
  qemu: use virObject to manages reference-counting for qemu monitor

 src/Makefile.am          |    1 +
 src/libvirt_private.syms |    5 ++
 src/qemu/qemu_domain.c   |   26 +----------
 src/qemu/qemu_monitor.c  |  106 ++++++++++++++++++++++++++--------------------
 src/qemu/qemu_monitor.h  |    4 +-
 src/util/object.c        |   55 ++++++++++++++++++++++++
 src/util/object.h        |   39 +++++++++++++++++
 7 files changed, 164 insertions(+), 72 deletions(-)
 create mode 100644 src/util/object.c
 create mode 100644 src/util/object.h

-- 
1.7.3.1


-- 
Thanks,
Hu Tao

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]