Re: [libvirt] [PATCH 04/13] Add a generic reference counted virObject type

2012-07-17 Thread Eric Blake
On 07/11/2012 07:35 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This introduces a fairly basic reference counted virObject type and an associated virClass type, that use atomic operations for ref counting. +void *virObjectNew(virClassPtr klass) +{ +

Re: [libvirt] [PATCH 04/13] Add a generic reference counted virObject type

2012-07-17 Thread Eric Blake
On 07/17/2012 02:25 PM, Eric Blake wrote: On 07/11/2012 07:35 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This introduces a fairly basic reference counted virObject type and an associated virClass type, that use atomic operations for ref counting. +void

Re: [libvirt] [PATCH 04/13] Add a generic reference counted virObject type

2012-07-16 Thread Daniel P. Berrange
On Fri, Jul 13, 2012 at 04:38:26PM -0600, Eric Blake wrote: On 07/11/2012 07:35 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This introduces a fairly basic reference counted virObject type and an associated virClass type, that use atomic operations for ref

Re: [libvirt] [PATCH 04/13] Add a generic reference counted virObject type

2012-07-16 Thread Eric Blake
On 07/16/2012 09:52 AM, Daniel P. Berrange wrote: Object references can be manipulated with virObjectRef(conn) virObjectUnref(conn) The latter returns a true value, if the object has been freed (ie its ref count hit zero) Should these return the resulting refcount, and/or add a

Re: [libvirt] [PATCH 04/13] Add a generic reference counted virObject type

2012-07-13 Thread Eric Blake
On 07/11/2012 07:35 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This introduces a fairly basic reference counted virObject type and an associated virClass type, that use atomic operations for ref counting. In a global initializer (recommended to be invoked

[libvirt] [PATCH 04/13] Add a generic reference counted virObject type

2012-07-11 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com This introduces a fairly basic reference counted virObject type and an associated virClass type, that use atomic operations for ref counting. In a global initializer (recommended to be invoked using the virOnceInit API), a virClass type must be