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

Re: [libvirt] [PATCH 01/13] Add a simple macro for doing one-time global init using virOnce

On 07/11/2012 07:35 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange 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 redhat com>
> ---
>  src/util/threads.h |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 49 insertions(+)

Nice.  No difference until later patches use it, but:


Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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