Skip to contentSkip to conversation

Avoid multiple inclusion of qemu-lock.h

PATCH New Lionel Landwerlin 1 participant 1 message Jan 26, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Avoid multiple inclusion of qemu-lock.h

Avoid multiple inclusion of qemu-lock.h

qemu-lock.h +5 -0
index 26661ba..ce1c466 100644
@@ -24,6 +24,9 @@
    likely to release it soon.  In environments where you have more threads
    than physical CPUs (the extreme case being a single CPU host) a spinlock
    simply wastes CPU until the OS decides to preempt it.  */
+#ifndef QEMU_LOCK_H
+#define QEMU_LOCK_H
+
 #if defined(USE_NPTL)
 
 #include <pthread.h>
@@ -246,3 +249,5 @@ static inline int spin_trylock(spinlock_t *lock)
 #endif
 
 #endif
+
+#endif /* QEMU_LOCK_H */