[libvirt] [PATCH 01/13] Add a simple macro for doing one-time global init using virOnce
Eric Blake
eblake at redhat.com
Fri Jul 13 21:01:36 UTC 2012
On 07/11/2012 07:35 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> Using virOnce for global initialization is desirable since it
> ensures that initialization will always take place when it is
> needed, and guarantees it only occurs once. The problem is that
> the code to setup a global initializer with proper error
> propagation is tedious. This introduces VIR_ONCE_GLOBAL_INIT
> macro to simplify this.
>
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
> src/util/threads.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 49 insertions(+)
Nice. No difference until later patches use it, but:
ACK.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120713/ddef7f95/attachment-0001.sig>
More information about the libvir-list
mailing list