Avoid multiple inclusion of qemu-lock.h
PATCH 1/1 Avoid multiple inclusion of qemu-lock.h
Avoid multiple inclusion of qemu-lock.h
Signed-off-by Lionel Landwerlin <[email protected]>
qemu-lock.h +5 -0
@@ -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 */