util: atomic: use #pragma once

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Jonathon Jongsma 2019-06-18 11:12:46 -05:00 committed by Ján Tomko
parent a6d438a9a3
commit 54416b6a59

View File

@ -23,16 +23,15 @@
*
*/
#ifndef LIBVIRT_VIRATOMIC_H
# define LIBVIRT_VIRATOMIC_H
#pragma once
# include "internal.h"
#include "internal.h"
# ifdef VIR_ATOMIC_OPS_GCC
#ifdef VIR_ATOMIC_OPS_GCC
# define VIR_STATIC /* Nothing; we just never define the functions */
# else
#else
# define VIR_STATIC static
# endif
#endif
/**
* virAtomicIntGet:
@ -152,9 +151,9 @@ VIR_STATIC unsigned int virAtomicIntXor(volatile unsigned int *atomic,
unsigned int val)
ATTRIBUTE_NONNULL(1);
# undef VIR_STATIC
#undef VIR_STATIC
# ifdef VIR_ATOMIC_OPS_GCC
#ifdef VIR_ATOMIC_OPS_GCC
# define virAtomicIntGet(atomic) \
(__extension__ ({ \
@ -215,7 +214,7 @@ VIR_STATIC unsigned int virAtomicIntXor(volatile unsigned int *atomic,
}))
# else
#else
# ifdef VIR_ATOMIC_OPS_WIN32
@ -449,6 +448,4 @@ virAtomicIntXor(volatile unsigned int *atomic,
# define virAtomicIntXor(atomic, val) \
virAtomicIntXor((unsigned int *)atomic, val)
# endif
#endif /* LIBVIRT_VIRATOMIC_H */
#endif