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

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

 



On Wed, Mar 16, 2011 at 06:29:30PM +0800, Hu Tao wrote:
> 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.

I think this is a good idea. I was looking at glib's GObject code
the other day and noticed that they used atomic arithmetic for
lockless reference counting. If its good enough for them, it is
good enough for us too.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
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]